Function at 0x546580
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x5e2f2f
mov eax, dword fs:[0]
push eax
sub esp, 0x16c
mov eax, dword [0x694114]
xor eax, esp
mov dword [esp + 0x168], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x694114]
xor eax, esp
push eax
lea eax, [esp + 0x180]
mov dword fs:[0], eax
mov edi, dword [esp + 0x194]
mov eax, dword [esp + 0x190]
mov ecx, dword [esp + 0x198]
xor esi, esi
mov dword [esp + 0x18], esi
mov edx, dword [edi + 8]
mov ebx, dword [edi]
mov dword [esp + 0x44], eax
mov eax, dword [edi + 4]
mov dword [esp + 0x24], ecx
mov ecx, dword [edi + 0xc]
xor ebp, ebp
mov dword [esp + 0x74], edi
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], edx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x54], esi
mov dword [esp + 0x50], esi
mov dword [esp + 0x40], esi
mov dword [esp + 0x98], esi
mov dword [esp + 0x68], esi
mov dword [esp + 0x48], esi
mov dword [esp + 0x58], esi
mov dword [esp + 0x9c], esi
mov dword [esp + 0x80], esi
mov dword [esp + 0x84], esi
mov dword [esp + 0x78], esi
mov byte [esp + 0x17], 1
cmp eax, esi
jge 0x546647
neg eax
mov byte [esp + 0x17], 0
mov dword [esp + 0x38], eax
mov ecx, dword [esp + 0x44]
call fcn.004e6960
mov edx, dword [esp + 0x38]
mov ecx, dword [esp + 0x44]
push 1
push edx
push ebx
call fcn.005359c0
mov ecx, dword [esp + 0x44]
call fcn.00534700
mov dword [esp + 0x30], eax
cmp eax, esi
jne 0x546a20
cmp byte [esp + 0x19c], 0
je 0x546a19
mov ebp, 8
xor al, al
lea ebx, [ebp - 1]
mov edi, edi
test al, al
jne 0x5466ef
lea eax, [esp + 0x100]
push 0x5fcf00
push eax
call fcn.00423280
add esp, 8
mov edi, eax
or dword [esp + 0x18], 1
mov dword [esp + 0x188], esi
cmp dword [0x695aa8], esi
je 0x5466d3
call sub.KERNEL32.dll_GetCurrentThreadId
cmp eax, dword [0x695aa8]
je 0x5466d3
call fcn.004443b0
jmp 0x5466d8
mov al, byte [0x68a580]
test al, al
je 0x5466ef
push edi
call fcn.00445fa0
add esp, 4
mov byte [esp + 0x17], 1
cmp eax, 1
jae 0x5466f4
mov byte [esp + 0x17], 0
test byte [esp + 0x18], 1
mov dword [esp + 0x188], 0xffffffff
je 0x546734
mov ecx, dword [esp + 0x11c]
and dword [esp + 0x18], 0xfffffffe
push ecx
call fcn.005844d1
add esp, 4
cmp dword [esp + 0x114], ebp
jb 0x546734
mov edx, dword [esp + 0x100]
push edx
call fcn.00584768
add esp, 4
cmp byte [esp + 0x17], 0
je 0x546a19
push str.BMP:_Couldnt_allocate_memory.
lea ecx, [esp + 0x104]
call fcn.00402bb0
xor eax, eax
mov dword [esp + 0x188], 1
mov dword [esp + 0xec], ebx
mov dword [esp + 0xe8], esi
mov word [esp + 0xd8], ax
mov dword [esp + 0xf4], esi
mov dword [esp + 0xf8], esi
xor ecx, ecx
mov dword [esp + 0xc8], ebx
mov dword [esp + 0xc4], esi
mov word [esp + 0xb4], cx
mov dword [esp + 0xd0], esi
mov dword [esp + 0xd4], esi
mov byte [esp + 0x188], 3
call fcn.00425e70
cmp eax, esi
je 0x5467db
lea edx, [esp + 0xd8]
push edx
lea ecx, [esp + 0xb8]
push ecx
lea edx, [esp + 0x108]
push edx
mov ecx, eax
call fcn.00429320
cmp eax, esi
jne 0x5467eb
lea eax, [esp + 0x100]
push eax
call fcn.004292f0
add esp, 4
mov edi, eax
call fcn.00420510
mov dword [esp + 0xa0], eax
mov byte [esp + 0x188], 4
call fcn.00420510
mov dword [esp + 0xa4], eax
mov byte [esp + 0x188], 5
call fcn.00420510
mov dword [esp + 0xa8], eax
mov dword [esp + 0xac], edi
mov dword [esp + 0xb0], esi
mov byte [esp + 0x188], 6
mov dword [esp + 0x124], 1
mov dword [esp + 0x12c], str....._srccommonimagbmp.cpp
mov dword [esp + 0x134], str._anonymous_namespace::LoadBMPData
mov dword [esp + 0x130], 0x22c
mov dword [esp + 0x138], 0x5fcf00
mov dword [esp + 0x13c], esi
mov dword [esp + 0x140], esi
mov dword [esp + 0x144], esi
mov dword [esp + 0x148], esi
call sub.KERNEL32.dll_GetCurrentThreadId
xor ecx, ecx
mov dword [esp + 0x14c], eax
mov dword [esp + 0x150], esi
mov dword [esp + 0x168], ebx
mov dword [esp + 0x164], esi
mov word [esp + 0x154], cx
mov dword [esp + 0x170], esi
mov dword [esp + 0x174], esi
lea ecx, [esp + 0xa0]
mov byte [esp + 0x188], bl
call fcn.0041de00
push eax
lea edx, [esp + 0x128]
push edx
call fcn.0040b680
mov eax, dword [esp + 0x178]
push eax
mov byte [esp + 0x194], 6
call fcn.005844d1
add esp, 0xc
cmp dword [esp + 0x168], ebp
jb 0x546915
mov ecx, dword [esp + 0x154]
push ecx
call fcn.00584768
add esp, 4
mov ecx, dword [esp + 0x150]
xor edx, edx
mov dword [esp + 0x168], ebx
mov dword [esp + 0x164], esi
mov word [esp + 0x154], dx
mov edi, ecx
cmp ecx, esi
je 0x546948
call fcn.0040c030
push edi
call fcn.00584768
add esp, 4
lea ecx, [esp + 0xa0]
mov byte [esp + 0x188], 3
call fcn.004020c0
mov eax, dword [esp + 0xd0]
push eax
call fcn.005844d1
add esp, 4
cmp dword [esp + 0xc8], ebp
jb 0x546985
mov ecx, dword [esp + 0xb4]
push ecx
call fcn.00584768
add esp, 4
mov eax, dword [esp + 0xf4]
xor edx, edx
push eax
mov dword [esp + 0xcc], ebx
mov dword [esp + 0xc8], esi
mov word [esp + 0xb8], dx
call fcn.005844d1
add esp, 4
cmp dword [esp + 0xec], ebp
jb 0x5469c6
mov ecx, dword [esp + 0xd8]
push ecx
call fcn.00584768
add esp, 4
mov eax, dword [esp + 0x11c]
xor edx, edx
push eax
mov dword [esp + 0xf0], ebx
mov dword [esp + 0xec], esi
mov word [esp + 0xdc], dx
mov dword [esp + 0x18c], 0xffffffff
call fcn.005844d1
add esp, 4
cmp dword [esp + 0x114], ebp
jb 0x546a12
mov ecx, dword [esp + 0x100]
push ecx
call fcn.00584768
add esp, 4
mov al, 1
jmp 0x546690
xor al, al
jmp 0x5478f4
mov edx, dword [esp + 0x3c]
mov eax, 8
cmp edx, 0x20
jne 0x546dad
mov ecx, dword [esp + 0x44]
push esi
push esi
call fcn.00534720
mov ecx, dword [esp + 0x44]
call fcn.00534790
mov dword [esp + 0x94], eax
cmp eax, esi
jne 0x546f29
cmp byte [esp + 0x19c], 0
je 0x546a19
mov ebp, 8
xor al, al
lea ebx, [ebp - 1]
lea esp, [esp]
test al, al
jne 0x546acf
lea edx, [esp + 0x100]
push 0x5fcf00
push edx
call fcn.00423280
add esp, 8
mov edi, eax
or dword [esp + 0x18], 2
mov dword [esp + 0x188], ebp
cmp dword [0x695aa8], esi
je 0x546ab3
call sub.KERNEL32.dll_GetCurrentThreadId
cmp eax, dword [0x695aa8]
je 0x546ab3
call fcn.004443b0
jmp 0x546ab8
mov al, byte [0x68a580]
test al, al
je 0x546acf
push edi
call fcn.00445fa0
add esp, 4
mov byte [esp + 0x17], 1
cmp eax, 1
jae 0x546ad4
mov byte [esp + 0x17], 0
test byte [esp + 0x18], 2
mov dword [esp + 0x188], 0xffffffff
je 0x546b14
mov eax, dword [esp + 0x11c]
and dword [esp + 0x18], 0xfffffffd
push eax
call fcn.005844d1
add esp, 4
cmp dword [esp + 0x114], ebp
jb 0x546b14
mov ecx, dword [esp + 0x100]
push ecx
call fcn.00584768
add esp, 4
cmp byte [esp + 0x17], 0
je 0x546a19
push str.BMP:_Couldnt_allocate_memory.
lea ecx, [esp + 0x104]
call fcn.00402bb0
xor edx, edx
mov dword [esp + 0x188], 9
mov dword [esp + 0xc8], ebx
mov dword [esp + 0xc4], esi
mov word [esp + 0xb4], dx
mov dword [esp + 0xd0], esi
mov dword [esp + 0xd4], esi
xor eax, eax
mov dword [esp + 0xec], ebx
mov dword [esp + 0xe8], esi
mov word [esp + 0xd8], ax
mov dword [esp + 0xf4], esi
mov dword [esp + 0xf8], esi
mov byte [esp + 0x188], 0xb
call fcn.00425e70
cmp eax, esi
je 0x546bbb
lea ecx, [esp + 0xb4]
push ecx
lea edx, [esp + 0xdc]
push edx
lea ecx, [esp + 0x108]
push ecx
mov ecx, eax
call fcn.00429320
cmp eax, esi
jne 0x546bcb
lea edx, [esp + 0x100]
push edx
call fcn.004292f0
add esp, 4
mov edi, eax
call fcn.00420510
mov dword [esp + 0xa0], eax
mov byte [esp + 0x188], 0xc
call fcn.00420510
mov dword [esp + 0xa4], eax
mov byte [esp + 0x188], 0xd
call fcn.00420510
mov dword [esp + 0xa8], eax
mov dword [esp + 0xac], edi
mov dword [esp + 0xb0], esi
mov byte [esp + 0x188], 0xe
mov dword [esp + 0x124], 1
mov dword [esp + 0x12c], str....._srccommonimagbmp.cpp
mov dword [esp + 0x134], str._anonymous_namespace::LoadBMPData
mov dword [esp + 0x130], 0x23b
mov dword [esp + 0x138], 0x5fcf00
mov dword [esp + 0x13c], esi
mov dword [esp + 0x140], esi
mov dword [esp + 0x144], esi
mov dword [esp + 0x148], esi
call sub.KERNEL32.dll_GetCurrentThreadId
mov dword [esp + 0x14c], eax
xor eax, eax
mov dword [esp + 0x150], esi
mov dword [esp + 0x168], ebx
mov dword [esp + 0x164], esi
mov word [esp + 0x154], ax
mov dword [esp + 0x170], esi
mov dword [esp + 0x174], esi
lea ecx, [esp + 0xa0]
mov byte [esp + 0x188], 0xf
call fcn.0041de00
push eax
lea ecx, [esp + 0x128]
push ecx
call fcn.0040b680
add esp, 8
lea ecx, [esp + 0x124]
mov byte [esp + 0x188], 0xe
call fcn.0040e140
lea ecx, [esp + 0xa0]
mov byte [esp + 0x188], 0xb
call fcn.004020c0
mov edx, dword [esp + 0xf4]
push edx
call fcn.005844d1
add esp, 4
cmp dword [esp + 0xec], ebp
jb 0x546d19
mov eax, dword [esp + 0xd8]
push eax
call fcn.00584768
add esp, 4
mov edx, dword [esp + 0xd0]
xor ecx, ecx
push edx
mov dword [esp + 0xf0], ebx
mov dword [esp + 0xec], esi
mov word [esp + 0xdc], cx
call fcn.005844d1
add esp, 4
cmp dword [esp + 0xc8], ebp
jb 0x546d5a
mov eax, dword [esp + 0xb4]
push eax
call fcn.00584768
add esp, 4
mov edx, dword [esp + 0x11c]
xor ecx, ecx
push edx
mov dword [esp + 0xcc], ebx
mov dword [esp + 0xc8], esi
mov word [esp + 0xb8], cx
mov dword [esp + 0x18c], 0xffffffff
call fcn.005844d1
add esp, 4
cmp dword [esp + 0x114], ebp
jb 0x546da6
mov eax, dword [esp + 0x100]
push eax
call fcn.00584768
add esp, 4
mov al, 1
jmp 0x546a70
mov dword [esp + 0x94], esi
cmp edx, 0x10
jge 0x546f21
cmp dword [esp + 0x20], esi
je 0x546f1e
mov ebp, dword [edi + 0x14]
cmp ebp, esi
jne 0x546df8
mov al, 0xff
lea ebp, [esp + 0x88]
mov word [esp + 0x89], si
mov byte [esp + 0x88], 0
mov word [esp + 0x8c], 0xffff
mov byte [esp + 0x8b], al
mov ecx, dword [esp + 0x20]
push ecx
call fcn.0058229a
mov dword [esp + 0x60], eax
mov edx, dword [esp + 0x24]
push edx
mov dword [esp + 0x190], 0x10
call fcn.0058229a
mov dword [esp + 0x78], eax
mov eax, dword [esp + 0x28]
push eax
mov byte [esp + 0x194], 0x11
call fcn.0058229a
add esp, 0xc
mov dword [esp + 0x18], eax
cmp dword [esp + 0x20], esi
jle 0x546e89
mov eax, dword [esp + 0x70]
mov ecx, dword [esp + 0x5c]
sub ecx, eax
mov dword [esp + 0x6c], ecx
mov ecx, dword [esp + 0x18]
sub ecx, eax
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x20]
lea edi, [ebp + 2]
mov dword [esp + 0x1c], ecx
movzx edx, byte [edi - 2]
mov ecx, dword [esp + 0x6c]
mov byte [ecx + eax], dl
movzx edx, byte [edi - 1]
mov byte [eax], dl
mov cl, byte [edi]
mov edx, dword [esp + 0x28]
mov byte [edx + eax], cl
inc eax
add edi, 3
dec dword [esp + 0x1c]
jne 0x546e61
mov edi, dword [esp + 0x74]
mov dword [esp + 0x64], esi
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x70]
mov edx, dword [esp + 0x5c]
push eax
mov eax, dword [esp + 0x24]
push ecx
push edx
push eax
lea ecx, [esp + 0x70]
mov byte [esp + 0x198], 0x13
mov dword [esp + 0x70], vtable.wxPalette.0
call fcn.004f1e40
lea ecx, [esp + 0x60]
push ecx
mov ecx, dword [esp + 0x48]
mov byte [esp + 0x18c], 0x14
call fcn.00536b80
lea ecx, [esp + 0x60]
mov byte [esp + 0x188], 0x12
mov dword [esp + 0x60], vtable.wxObject.0
call fcn.00423980
mov edx, dword [esp + 0x18]
push edx
call fcn.00585c9e
mov eax, dword [esp + 0x74]
push eax
call fcn.00585c9e
mov ecx, dword [esp + 0x64]
push ecx
mov dword [esp + 0x194], 0xffffffff
call fcn.00585c9e
mov edx, dword [esp + 0x48]
add esp, 0xc
jmp 0x547081
cmp edx, 0x10
jne 0x547081
jmp 0x546f32
mov edx, dword [esp + 0x3c]
mov eax, 8
cmp dword [edi + 0x10], 3
jne 0x547002
mov eax, dword [edi + 0x18]
mov ecx, dword [edi + 0x1c]
mov dword [esp + 0x54], eax
mov eax, dword [edi + 0x20]
mov dword [esp + 0x40], eax
mov dword [esp + 0x50], ecx
lea ecx, [edx - 1]
mov eax, 1
rol eax, cl
cmp ecx, esi
jl 0x546f88
test dword [esp + 0x40], eax
je 0x546f69
mov dword [esp + 0x58], ecx
test dword [esp + 0x50], eax
je 0x546f73
mov dword [esp + 0x48], ecx
test dword [esp + 0x54], eax
je 0x546f7d
mov dword [esp + 0x68], ecx
dec ecx
ror eax, 1
cmp ecx, esi
jge 0x546f5f
mov edx, dword [esp + 0x3c]
mov dword [esp + 0x6c], 1
cmp edx, esi
jle 0x547081
mov ecx, dword [esp + 0x48]
mov eax, 1
sub eax, ecx
sub ecx, dword [esp + 0x58]
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x48]
sub ecx, dword [esp + 0x68]
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x6c]
test dword [esp + 0x40], ecx
je 0x546fd3
mov edx, dword [esp + 0x28]
add edx, eax
mov dword [esp + 0x78], edx
test dword [esp + 0x50], ecx
je 0x546fe0
mov dword [esp + 0x84], eax
test dword [esp + 0x54], ecx
je 0x546ff3
mov edx, dword [esp + 0x18]
add edx, eax
mov dword [esp + 0x80], edx
inc eax
rol ecx, 1
dec dword [esp + 0x1c]
jne 0x546fc3
mov edx, dword [esp + 0x3c]
jmp 0x547081
cmp edx, 0x10
jne 0x54702c
mov dword [esp + 0x54], 0x7c00
mov dword [esp + 0x50], 0x3e0
mov dword [esp + 0x40], 0x1f
mov dword [esp + 0x68], 0xa
lea eax, [edx - 0xb]
jmp 0x547067
cmp edx, 0x20
jne 0x547081
mov dword [esp + 0x54], 0xff0000
mov dword [esp + 0x50], 0xff00
mov dword [esp + 0x40], 0xff
mov dword [esp + 0x98], 0xff000000
mov dword [esp + 0x9c], 0x18
mov dword [esp + 0x68], 0x10
mov dword [esp + 0x78], eax
mov dword [esp + 0x84], eax
mov dword [esp + 0x80], eax
mov dword [esp + 0x58], esi
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x30]
mov ecx, eax
cmp edx, 0x10
jge 0x5470c4
mov edi, dword [edi + 0x10]
cmp edi, 2
je 0x547099
cmp edi, 1
jne 0x5470c4
mov edx, dword [esp + 0x38]
imul edx, ebx
cmp edx, esi
jle 0x5470c0
mov edi, edx
movzx edx, byte [ebp]
mov byte [eax], dl
movzx edx, byte [ebp + 1]
mov byte [eax + 1], dl
movzx edx, byte [ebp + 2]
mov byte [eax + 2], dl
add eax, 3
dec edi
jne 0x5470a6
mov dword [esp + 0x30], ecx
mov eax, dword [esp + 0x3c]
imul eax, ebx
add eax, 0x1f
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
add eax, eax
add eax, eax
mov dword [esp + 0x6c], eax
mov byte [esp + 0x37], 0
mov dword [esp + 0x20], esi
cmp dword [esp + 0x38], esi
jle 0x5478b8
cmp byte [esp + 0x17], 0
je 0x547104
mov edi, dword [esp + 0x38]
sub edi, dword [esp + 0x20]
dec edi
jmp 0x547108
mov edi, dword [esp + 0x20]
xor esi, esi
mov dword [esp + 0x18], esi
cmp ebx, esi
jle 0x547862
jmp 0x547120
mov eax, dword [esp + 0x3c]
cmp eax, 0x10
jge 0x5476b4
mov ecx, dword [esp + 0x24]
inc dword [esp + 0x18]
call fcn.004740e0
mov ecx, dword [esp + 0x24]
mov byte [esp + 0x16], al
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
call edx
test al, al
je 0x546a19
mov eax, dword [esp + 0x3c]
cmp eax, 1
jne 0x5471b7
xor ecx, ecx
mov dword [esp + 0x1c], ecx
cmp esi, ebx
jge 0x547862
mov eax, 0x80
sar eax, cl
mov edx, 0
test byte [esp + 0x16], al
mov eax, edi
setne dl
imul eax, ebx
lea ecx, [ebp + edx*2]
add edx, ecx
mov ecx, dword [esp + 0x30]
add eax, esi
lea ecx, [ecx + eax*2]
add eax, ecx
movzx ecx, byte [edx]
mov byte [eax], cl
movzx ecx, byte [edx + 1]
mov byte [eax + 1], cl
mov ecx, dword [esp + 0x1c]
mov dl, byte [edx + 2]
inc ecx
inc esi
mov byte [eax + 2], dl
mov dword [esp + 0x1c], ecx
cmp ecx, 8
jl 0x547160
jmp 0x547846
cmp eax, 4
jne 0x547461
mov eax, dword [esp + 0x74]
cmp dword [eax + 0x10], 2
jne 0x5473e6
mov cl, byte [esp + 0x16]
mov byte [esp + 0x2f], cl
mov ecx, dword [esp + 0x24]
call fcn.004740e0
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx]
mov byte [esp + 0x16], al
mov eax, dword [edx + 0x10]
call eax
test al, al
je 0x546a19
mov cl, byte [esp + 0x2f]
mov al, byte [esp + 0x16]
test cl, cl
jne 0x54736a
test al, al
jne 0x547217
test esi, esi
jne 0x547862
jmp 0x547846
cmp al, 1
je 0x547850
cmp al, 2
jne 0x54728d
mov edi, dword [esp + 0x24]
mov ecx, edi
call fcn.004740e0
mov edx, dword [edi]
mov byte [esp + 0x16], al
mov eax, dword [edx + 0x10]
mov ecx, edi
call eax
test al, al
je 0x546a19
movzx ecx, byte [esp + 0x16]
add esi, ecx
mov ecx, edi
call fcn.004740e0
mov edx, dword [edi]
mov byte [esp + 0x16], al
mov eax, dword [edx + 0x10]
mov ecx, edi
call eax
test al, al
je 0x546a19
movzx ecx, byte [esp + 0x16]
add dword [esp + 0x20], ecx
cmp byte [esp + 0x17], 0
je 0x547284
mov edi, dword [esp + 0x38]
sub edi, dword [esp + 0x20]
dec edi
jmp 0x547846
mov edi, dword [esp + 0x20]
jmp 0x547846
movzx ecx, al
xor eax, eax
mov dword [esp + 0x60], ecx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x28], eax
cmp ecx, eax
jle 0x54733a
and eax, 0x80000001
jns 0x5472b2
dec eax
or eax, 0xfffffffe
inc eax
mov dword [esp + 0xfc], eax
jne 0x5472f9
mov ecx, dword [esp + 0x24]
inc dword [esp + 0x1c]
call fcn.004740e0
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx]
mov byte [esp + 0x16], al
mov eax, dword [edx + 0x10]
call eax
test al, al
je 0x546a19
mov al, byte [esp + 0x16]
mov cl, al
shr cl, 4
and al, 0xf
mov byte [esp + 0x5d], al
mov eax, dword [esp + 0xfc]
mov byte [esp + 0x5c], cl
movzx ecx, byte [esp + eax + 0x5c]
mov eax, edi
imul eax, ebx
lea edx, [ebp + ecx*2]
add ecx, edx
mov edx, dword [esp + 0x30]
add eax, esi
lea edx, [edx + eax*2]
add eax, edx
movzx edx, byte [ecx]
mov byte [eax], dl
movzx edx, byte [ecx + 1]
mov byte [eax + 1], dl
mov cl, byte [ecx + 2]
mov byte [eax + 2], cl
mov eax, dword [esp + 0x28]
inc eax
inc esi
mov dword [esp + 0x28], eax
cmp eax, dword [esp + 0x60]
jl 0x5472a6
test byte [esp + 0x1c], 1
je 0x547846
mov ecx, dword [esp + 0x24]
call fcn.004740e0
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx]
mov byte [esp + 0x16], al
mov eax, dword [edx + 0x10]
call eax
test al, al
je 0x546a19
jmp 0x547846
mov dl, al
and al, 0xf
movzx ecx, cl
shr dl, 4
mov byte [esp + 0x71], al
xor eax, eax
mov byte [esp + 0x70], dl
mov dword [esp + 0x28], eax
mov dword [esp + 0x60], ecx
test ecx, ecx
jle 0x547846
mov edi, edi
cmp esi, ebx
jge 0x547862
and eax, 0x80000001
jns 0x5473a4
dec eax
or eax, 0xfffffffe
inc eax
movzx ecx, byte [esp + eax + 0x70]
mov edx, dword [esp + 0x30]
lea eax, [ebp + ecx*2]
add ecx, eax
mov eax, edi
imul eax, ebx
add eax, esi
lea edx, [edx + eax*2]
add eax, edx
movzx edx, byte [ecx]
mov byte [eax], dl
movzx edx, byte [ecx + 1]
mov byte [eax + 1], dl
mov cl, byte [ecx + 2]
mov byte [eax + 2], cl
mov eax, dword [esp + 0x28]
inc eax
inc esi
mov dword [esp + 0x28], eax
cmp eax, dword [esp + 0x60]
jl 0x547390
jmp 0x547846
xor ecx, ecx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x28], ecx
cmp esi, ebx
jge 0x547862
movzx edx, byte [esp + 0x16]
mov eax, 0xf0
sar eax, cl
xor ecx, ecx
and eax, edx
cmp dword [esp + 0x1c], ecx
sete cl
add ecx, ecx
add ecx, ecx
sar eax, cl
cmp eax, 0x10
jl 0x54741f
mov eax, 0xf
mov edx, dword [esp + 0x30]
lea ecx, [ebp + eax*2]
add ecx, eax
mov eax, edi
imul eax, ebx
inc dword [esp + 0x1c]
add eax, esi
lea edx, [edx + eax*2]
add eax, edx
movzx edx, byte [ecx]
mov byte [eax], dl
movzx edx, byte [ecx + 1]
mov byte [eax + 1], dl
mov cl, byte [ecx + 2]
mov byte [eax + 2], cl
mov ecx, dword [esp + 0x28]
add ecx, 4
inc esi
mov dword [esp + 0x28], ecx
cmp ecx, 8
jl 0x5473f0
jmp 0x547846
cmp eax, 8
jne 0x547846
mov edx, dword [esp + 0x74]
cmp dword [edx + 0x10], 1
jne 0x54766e
mov al, byte [esp + 0x16]
mov ecx, dword [esp + 0x24]
mov byte [esp + 0x2f], al
call fcn.004740e0
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx]
mov byte [esp + 0x16], al
mov eax, dword [edx + 0x10]
call eax
test al, al
je 0x546a19
mov al, byte [esp + 0x2f]
test al, al
jne 0x5475f2
mov al, byte [esp + 0x16]
test al, al
jne 0x5474c1
test esi, esi
jne 0x547862
jmp 0x547846
cmp al, 1
je 0x54785a
cmp al, 2
jne 0x547532
mov edi, dword [esp + 0x24]
mov ecx, edi
call fcn.004740e0
mov edx, dword [edi]
mov byte [esp + 0x16], al
mov eax, dword [edx + 0x10]
mov ecx, edi
call eax
test al, al
je 0x546a19
movzx ecx, byte [esp + 0x16]
add esi, ecx
mov ecx, edi
call fcn.004740e0
mov edx, dword [edi]
mov byte [esp + 0x16], al
mov eax, dword [edx + 0x10]
mov ecx, edi
call eax
test al, al
je 0x546a19
movzx ecx, byte [esp + 0x16]
add dword [esp + 0x20], ecx
cmp byte [esp + 0x17], 0
je 0x547284
mov edi, dword [esp + 0x38]
sub edi, dword [esp + 0x20]
dec edi
jmp 0x547846
movzx eax, al
mov dword [esp + 0x1c], eax
mov dword [esp + 0x28], 0
test eax, eax
jle 0x5475c5
lea esp, [esp]
mov ecx, dword [esp + 0x24]
call fcn.004740e0
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx]
mov byte [esp + 0x16], al
mov eax, dword [edx + 0x10]
call eax
test al, al
je 0x546a19
mov ecx, dword [esp + 0x30]
mov eax, edi
imul eax, ebx
add eax, esi
lea edx, [ecx + eax*2]
movzx ecx, byte [esp + 0x16]
add eax, edx
lea edx, [ebp + ecx*2]
movzx ecx, byte [ecx + edx]
mov byte [eax], cl
movzx ecx, byte [esp + 0x16]
lea edx, [ebp + ecx*2]
movzx ecx, byte [ecx + edx + 1]
mov byte [eax + 1], cl
movzx ecx, byte [esp + 0x16]
lea edx, [ebp + ecx*2]
movzx ecx, byte [ecx + edx + 2]
mov byte [eax + 2], cl
mov eax, dword [esp + 0x28]
inc eax
inc esi
mov dword [esp + 0x28], eax
cmp eax, dword [esp + 0x1c]
jl 0x547550
mov eax, dword [esp + 0x1c]
test al, 1
je 0x547846
mov ecx, dword [esp + 0x24]
call fcn.004740e0
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx]
mov byte [esp + 0x16], al
mov eax, dword [edx + 0x10]
call eax
test al, al
je 0x546a19
jmp 0x547846
movzx eax, al
mov dword [esp + 0x28], 0
mov dword [esp + 0x60], eax
test eax, eax
jle 0x547846
lea esp, [esp]
cmp esi, ebx
jge 0x547862
mov ecx, dword [esp + 0x30]
mov eax, edi
imul eax, ebx
add eax, esi
lea edx, [ecx + eax*2]
movzx ecx, byte [esp + 0x16]
add eax, edx
lea edx, [ebp + ecx*2]
movzx ecx, byte [ecx + edx]
mov byte [eax], cl
movzx ecx, byte [esp + 0x16]
lea edx, [ebp + ecx*2]
movzx ecx, byte [ecx + edx + 1]
mov byte [eax + 1], cl
movzx ecx, byte [esp + 0x16]
lea edx, [ebp + ecx*2]
movzx ecx, byte [ecx + edx + 2]
mov byte [eax + 2], cl
mov eax, dword [esp + 0x28]
inc eax
inc esi
mov dword [esp + 0x28], eax
cmp eax, dword [esp + 0x60]
jl 0x547610
jmp 0x547846
mov edx, dword [esp + 0x30]
mov eax, edi
imul eax, ebx
add eax, esi
lea ecx, [edx + eax*2]
add eax, ecx
movzx ecx, byte [esp + 0x16]
lea edx, [ebp + ecx*2]
movzx ecx, byte [ecx + edx]
mov byte [eax], cl
movzx ecx, byte [esp + 0x16]
lea edx, [ebp + ecx*2]
movzx ecx, byte [ecx + edx + 1]
mov byte [eax + 1], cl
movzx ecx, byte [esp + 0x16]
lea edx, [ebp + ecx*2]
movzx ecx, byte [ecx + edx + 2]
mov byte [eax + 2], cl
jmp 0x547845
cmp eax, 0x18
jne 0x54770d
mov ecx, dword [esp + 0x24]
push 3
lea edx, [esp + 0x94]
push edx
call fcn.004741d0
test al, al
je 0x546a19
mov ecx, dword [esp + 0x30]
add dword [esp + 0x18], 3
mov eax, edi
imul eax, ebx
add eax, esi
lea edx, [ecx + eax*2]
movzx ecx, byte [esp + 0x92]
add eax, edx
mov byte [eax], cl
mov dl, byte [esp + 0x91]
mov byte [eax + 1], dl
movzx ecx, byte [esp + 0x90]
mov byte [eax + 2], cl
jmp 0x547845
cmp eax, 0x10
jne 0x5477b0
mov ecx, dword [esp + 0x24]
push 2
lea edx, [esp + 0x50]
push edx
call fcn.004741d0
test al, al
je 0x546a19
mov ecx, dword [esp + 0x30]
mov eax, edi
imul eax, ebx
add eax, esi
lea edx, [ecx + eax*2]
mov ecx, dword [esp + 0x68]
add eax, edx
mov dword [esp + 0x1c], eax
movzx eax, word [esp + 0x4c]
and eax, dword [esp + 0x54]
add dword [esp + 0x18], 2
sar eax, cl
mov ecx, 8
sub ecx, dword [esp + 0x80]
shl al, cl
mov ecx, dword [esp + 0x1c]
mov byte [ecx], al
movzx edx, word [esp + 0x4c]
and edx, dword [esp + 0x50]
mov ecx, dword [esp + 0x48]
mov eax, dword [esp + 0x1c]
sar edx, cl
mov ecx, 8
sub ecx, dword [esp + 0x84]
shl dl, cl
mov ecx, dword [esp + 0x58]
mov byte [eax + 1], dl
movzx edx, word [esp + 0x4c]
and edx, dword [esp + 0x40]
sar edx, cl
mov ecx, 8
sub ecx, dword [esp + 0x78]
shl dl, cl
mov byte [eax + 2], dl
jmp 0x547845
push 4
lea ecx, [esp + 0x80]
push ecx
mov ecx, dword [esp + 0x2c]
call fcn.004741d0
test al, al
je 0x546a19
mov ecx, dword [esp + 0x30]
mov eax, edi
imul eax, ebx
add eax, esi
lea edx, [ecx + eax*2]
mov ecx, dword [esp + 0x68]
mov dword [esp + 0x60], eax
add eax, edx
mov edx, dword [esp + 0x7c]
and edx, dword [esp + 0x54]
add dword [esp + 0x18], 4
sar edx, cl
mov ecx, dword [esp + 0x48]
mov byte [eax], dl
mov edx, dword [esp + 0x7c]
and edx, dword [esp + 0x50]
sar edx, cl
mov ecx, dword [esp + 0x58]
mov byte [eax + 1], dl
mov edx, dword [esp + 0x7c]
and edx, dword [esp + 0x40]
sar edx, cl
mov byte [eax + 2], dl
mov edx, dword [esp + 0x94]
test edx, edx
je 0x547845
mov eax, dword [esp + 0x7c]
and eax, dword [esp + 0x98]
mov ecx, dword [esp + 0x9c]
sar eax, cl
mov ecx, dword [esp + 0x60]
mov byte [ecx + edx], al
test al, al
je 0x547845
mov byte [esp + 0x37], 1
inc esi
cmp esi, ebx
jl 0x547120
jmp 0x547862
mov edx, dword [esp + 0x38]
mov dword [esp + 0x20], edx
jmp 0x547862
mov eax, dword [esp + 0x38]
mov dword [esp + 0x20], eax
mov ecx, dword [esp + 0x6c]
cmp dword [esp + 0x18], ecx
jge 0x5478a3
lea esp, [esp]
mov edx, dword [esp + 0x74]
mov eax, dword [edx + 0x10]
cmp eax, 1
je 0x5478a3
cmp eax, 2
je 0x5478a3
mov ecx, dword [esp + 0x24]
inc dword [esp + 0x18]
push 1
lea eax, [esp + 0x1a]
push eax
call fcn.004741d0
test al, al
je 0x5478a3
mov ecx, dword [esp + 0x18]
cmp ecx, dword [esp + 0x6c]
jl 0x547870
mov eax, dword [esp + 0x20]
inc eax
mov dword [esp + 0x20], eax
cmp eax, dword [esp + 0x38]
jl 0x5470f2
xor esi, esi
mov edi, dword [esp + 0x44]
push esi
mov ecx, edi
call fcn.00534860
cmp dword [esp + 0x94], esi
je 0x5478db
cmp byte [esp + 0x37], 0
jne 0x5478db
mov ecx, edi
call fcn.005352e0
mov edx, dword [esp + 0x24]
mov eax, dword [edx + 0xc]
cmp eax, esi
je 0x5478ef
cmp eax, 1
je 0x5478ef
xor eax, eax
jmp 0x5478f4
mov eax, 1
mov ecx, dword [esp + 0x180]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x168]
xor ecx, esp
call fcn.00585b7b
add esp, 0x178
ret