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

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x52ccb8
push eax
mov eax, dword [esp + 0x10]
mov dword fs:[0], esp
sub esp, 0x3c
push esi
push edi
xor edi, edi
cmp eax, edi
mov esi, ecx
je 0x47c50f
mov eax, dword [esp + 0x60]
cmp eax, edi
jl 0x47c50f
cmp eax, 5
jg 0x47c50f
cmp dword [esp + 0x64], edi
je 0x47c50f
cmp dword [esp + 0x58], edi
je 0x47c50f
push ebp
call fcn.0047ad00
mov ebp, dword [esp + 0x6c]
cmp ebp, edi
jne 0x47c0ef
lea eax, [esp + 0x34]
mov dword [esp + 0x34], edi
mov dword [esp + 0x38], edi
mov dword [esp + 0x3c], edi
mov dword [esp + 0x40], edi
mov dword [esp + 0x44], edi
mov dword [esp + 0x6c], eax
mov ebp, eax
mov eax, dword [esp + 0x70]
push ebx
xor ebx, ebx
cmp eax, 0xffffffff
setne bl
mov dword [esi + 0x58c], eax
mov eax, dword [esp + 0x68]
test eax, eax
mov dword [esp + 0x10], edi
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], ebx
jle 0x47c186
cmp dword [ebp + edi*4], 3
jb 0x47c15f
mov ecx, dword [0x5683f8]
push edi
push 0x53b5e8
push 0x530c80
push 0
push ecx
lea edx, [esp + 0x44]
push edx
mov dword [esp + 0x48], 0x53b59c
mov dword [esp + 0x4c], 0x12b
call fcn.00433f60
mov eax, dword [ebp + edi*4]
xor edx, edx
mov ecx, 3
add esp, 0x18
div ecx
mov dword [ebp + edi*4], edx
mov eax, dword [ebp + edi*4]
cmp eax, 2
je 0x47c171
inc ebx
test eax, eax
jne 0x47c171
inc dword [esp + 0x10]
mov eax, dword [esp + 0x68]
inc edi
cmp edi, eax
jl 0x47c116
mov eax, dword [esp + 0x10]
test eax, eax
mov dword [esp + 0x14], ebx
jne 0x47c1d6
mov edx, dword [0x5683f8]
push 0x53b5bc
push 0x530c80
push 0
push edx
lea eax, [esp + 0x40]
mov esi, 0x53b59c
push eax
mov dword [esp + 0x44], esi
mov dword [esp + 0x48], 0x148
call fcn.00433f60
push 0x530474
lea ecx, [esp + 0x48]
push 0
push ecx
mov dword [esp + 0x50], esi
mov dword [esp + 0x54], 0x14e
call fcn.0041ce50
add esp, 0x20
jmp 0x47c20b
mov ecx, esi
mov dword [esi + 0x570], ebx
call fcn.0047b0e0
test al, al
jne 0x47c222
push 0x530474
push 0
lea edx, [esp + 0x38]
mov dword [esp + 0x38], 0x53b59c
mov dword [esp + 0x3c], 0x15a
push edx
call fcn.0041ce50
add esp, 0xc
pop ebx
pop ebp
pop edi
xor al, al
pop esi
mov ecx, dword [esp + 0x3c]
mov dword fs:[0], ecx
add esp, 0x48
ret 0x1c
mov ecx, esi
call fcn.0047ad50
test al, al
jne 0x47c24b
push 0x530474
push 0
lea eax, [esp + 0x38]
mov dword [esp + 0x38], 0x53b59c
mov dword [esp + 0x3c], 0x163
push eax
jmp 0x47c203
xor edi, edi
mov dword [esp + 0x30], 0x53a87c
mov dword [esp + 0x34], edi
push 0x258
push edi
push 0x18
push edi
mov dword [esp + 0x64], edi
call fcn.004951a0
add esp, 0x10
cmp eax, edi
mov dword [esp + 0x34], eax
jne 0x47c2a7
push 0x530474
lea ecx, [esp + 0x1c]
push edi
push ecx
mov dword [esp + 0x24], 0x53b59c
mov dword [esp + 0x28], 0x173
call fcn.0041ce50
add esp, 0xc
lea ecx, [esp + 0x30]
call fcn.00466000
jmp 0x47c20b
call fcn.00433720
mov ecx, 0x5ae1e8
mov dword [esi + 4], eax
call fcn.004467d0
sub ebx, dword [esp + 0x18]
mov ecx, dword [esp + 0x6c]
movzx edx, al
or eax, 0xffffffff
mov dword [esi + 0x2d8], ebx
mov dword [esi + 0x578], eax
mov dword [esi + 0x2e0], eax
xor ebx, ebx
xor eax, eax
mov dword [esi + 0x574], edx
mov dword [esi + 0x2dc], ecx
mov dword [esp + 0x10], eax
lea edi, [esi + 0x2e8]
cmp dword [ebp + eax*4], 2
je 0x47c349
mov edx, dword [esp + 0x6c]
mov ebp, dword [edx]
push 0x3e
push 0x2f8
mov ecx, edi
call fcn.0046f6e0
mov eax, dword [esp + 0x6c]
push ebp
add eax, 4
push eax
mov ecx, edi
call fcn.0046fae0
mov ecx, dword [esi + 0x574]
mov edx, dword [esp + 0x34]
push 0x19
push 2
push ecx
push edx
mov ecx, edi
call fcn.0046f700
mov eax, dword [edi + 0x1c]
cmp ebx, eax
jg 0x47c33e
mov ebx, eax
mov ebp, dword [esp + 0x70]
mov eax, dword [esp + 0x10]
add edi, 0x6c
mov ecx, dword [esp + 0x6c]
mov edx, dword [ecx]
lea ecx, [ecx + edx + 4]
mov dword [esp + 0x6c], ecx
mov ecx, dword [esp + 0x68]
inc eax
cmp eax, ecx
mov dword [esp + 0x10], eax
jl 0x47c2f3
push 0x3e
lea edi, [esi + 0x14]
add ebx, 0x78
push ebx
mov ecx, edi
call fcn.00464b40
lea edx, [esp + 0x28]
push edx
mov ecx, edi
call fcn.00464ce0
mov eax, dword [esp + 0x2c]
mov ebp, dword [esp + 0x28]
push eax
mov ebx, eax
push ebp
mov ecx, edi
mov dword [esp + 0x74], ebx
call fcn.00464b40
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x28]
push eax
push ebx
push ebp
push ecx
mov ecx, esi
call fcn.0047ae30
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
mov edx, eax
sar edx, 1
mov edi, 0x190
sub edi, edx
mov edx, ecx
sar edx, 1
mov ebx, 0x12c
sub ebx, edx
lea edx, [edi - 0xa]
mov dword [esp + 0x18], edx
lea edx, [ebx - 0xa]
lea ecx, [ebx + ecx + 0xa]
mov dword [esp + 0x1c], edx
lea edx, [esp + 0x18]
lea eax, [edi + eax + 0xa]
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x5c]
push edx
mov dword [esp + 0x24], eax
call fcn.0041f180
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x64]
lea edx, [esp + 0x28]
push edx
mov edx, dword [esp + 0x74]
push ebx
push edi
mov dword [esi + 0x57c], eax
mov eax, dword [esp + 0x78]
push eax
mov eax, dword [esp + 0x78]
mov dword [esi + 0x580], ecx
mov ecx, dword [esp + 0x84]
push ebp
push ecx
push edx
push eax
mov ecx, esi
call fcn.0047bba0
test al, al
jne 0x47c466
push 0x530474
lea ecx, [esp + 0x1c]
push 0
push ecx
mov dword [esp + 0x24], 0x53b59c
mov dword [esp + 0x28], 0x1c8
call fcn.0041ce50
mov edx, dword [esp + 0x40]
add esp, 0xc
push edx
call dword [sym.imp.gdi32.dll_DeleteObject]
jmp 0x47c20b
mov eax, dword [esp + 0x5c]
mov ecx, 0x47b980
test ecx, ecx
mov dword [esi + 0x5a0], 1
mov dword [esi + 0x5a4], eax
mov ecx, 0x47b980
jne 0x47c48b
mov ecx, dword [eax + 0x18]
mov dword [eax + 0x14], ecx
mov ecx, 0x47c050
xor edx, edx
test ecx, ecx
mov dword [eax + 0x18], edx
mov ecx, 0x47c050
jne 0x47c4a4
mov ecx, dword [eax + 0x38]
mov dword [eax + 0x34], ecx
mov ecx, 0x47b9f0
test ecx, ecx
mov dword [eax + 0x38], edx
je 0x47c4bc
mov dword [eax + 0x54], 0x47b9f0
jmp 0x47c4c3
mov dword [eax + 0x54], fcn.004b1b60
mov ecx, 0x47b9b0
test ecx, ecx
je 0x47c4d5
mov dword [eax + 0x50], 0x47b9b0
jmp 0x47c4dc
mov dword [eax + 0x50], fcn.004b1b60
mov edi, dword [eax + 0x44]
push edx
and edi, 0xfffffffd
push eax
mov dword [eax + 0x44], edi
call dword [eax + 0x54]
mov edx, dword [esp + 0x3c]
add esp, 8
push edx
call dword [sym.imp.gdi32.dll_DeleteObject]
pop ebx
pop ebp
pop edi
mov al, 1
pop esi
mov ecx, dword [esp + 0x3c]
mov dword fs:[0], ecx
add esp, 0x48
ret 0x1c
push 0x530474
lea eax, [esp + 0x2c]
push edi
push eax
mov dword [esp + 0x34], 0x53b59c
mov dword [esp + 0x38], 0x102
call fcn.0041ce50
mov ecx, dword [esp + 0x50]
add esp, 0xc
pop edi
xor al, al
pop esi
mov dword fs:[0], ecx
add esp, 0x48
ret 0x1c