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

Disassembly:
sub esp, 0x88
push ebx
push esi
push edi
mov edi, dword [esp + 0x98]
xor ebx, ebx
cmp edi, ebx
mov dword [esp + 0x10], ebx
je 0x474434
push ebx
call dword [0x512148]
mov esi, eax
cmp esi, ebx
mov dword [esp + 0x28], esi
je 0x474434
lea eax, [esp + 0x38]
push ebp
push eax
push 0x18
push edi
call dword [0x512198]
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x44]
push ebx
lea eax, [esp + 0x98]
mov dword [esp + 0x5c], ecx
push ebx
push eax
lea ecx, [esp + 0x60]
push ebx
push ecx
push esi
mov dword [esp + 0x6c], 0x28
mov dword [esp + 0x74], edx
mov word [esp + 0x78], 1
mov word [esp + 0x7a], 0x20
mov dword [esp + 0x7c], ebx
mov dword [esp + 0x80], ebx
mov dword [esp + 0x84], ebx
mov dword [esp + 0x88], ebx
mov dword [esp + 0x8c], ebx
mov dword [esp + 0x90], ebx
call dword [0x5120d8]
mov ebp, eax
cmp ebp, ebx
je 0x474420
push ebp
push esi
call dword [0x51219c]
push esi
mov dword [esp + 0x34], eax
call dword [0x512148]
mov ebx, eax
test ebx, ebx
mov dword [esp + 0x34], ebx
je 0x474409
lea edx, [esp + 0x7c]
push edx
push 0x18
push ebp
call dword [0x512198]
mov eax, dword [esp + 0x88]
mov ecx, eax
and ecx, 0x80000003
jns 0x474115
dec ecx
or ecx, 0xfffffffc
inc ecx
je 0x474130
inc eax
mov edx, eax
and edx, 0x80000003
jns 0x474127
dec edx
or edx, 0xfffffffc
inc edx
jne 0x474117
mov dword [esp + 0x88], eax
push edi
push ebx
call dword [0x51219c]
mov ecx, dword [esp + 0x40]
push 0xcc0020
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x48]
push 0
push 0
push ebx
push eax
push ecx
push 0
push 0
push esi
call dword [0x512150]
mov esi, dword [0x51214c]
push 1
push 1
push ebx
call esi
mov edx, dword [esp + 0xa0]
mov ebp, dword [0x5120d4]
push edx
push 1
push 1
push ebx
mov edi, eax
call ebp
push 1
push 1
push ebx
call esi
push edi
push 1
push 1
push ebx
mov dword [esp + 0xb0], eax
call ebp
mov ebp, 0x64
push 0x660
push 2
mov dword [esp + 0x20], ebp
call dword [0x51238c]
mov ebx, eax
push ebx
call dword [0x512390]
xor edi, edi
mov esi, eax
push edi
push edi
push 0x7fffffff
lea eax, [esi + 0x10]
push 0x7fffffff
push eax
mov dword [esi], 0x20
mov dword [esi + 4], 1
mov dword [esi + 0xc], edi
mov dword [esi + 8], edi
call dword [0x512594]
mov ecx, dword [esp + 0xa0]
xor eax, eax
mov al, ch
mov edx, dword [esp + 0x90]
mov byte [esp + 0x12], al
mov eax, ecx
mov ecx, dword [esp + 0x84]
mov dword [esp + 0x1c], edi
shr eax, 0x10
dec ecx
mov byte [esp + 0x13], al
imul ecx, dword [esp + 0x88]
mov eax, dword [esp + 0x44]
add ecx, edx
cmp eax, edi
mov dword [esp + 0x20], ecx
jle 0x4743ae
mov edx, dword [esp + 0x40]
xor edi, edi
test edx, edx
jle 0x47438c
lea eax, [ebp + 2]
shl eax, 4
mov dword [esp + 0x24], eax
cmp edi, edx
mov dword [esp + 0x28], edi
lea eax, [ecx + edi*4]
jge 0x474377
mov ebp, dword [eax]
mov cl, byte [esp + 0xa0]
mov edx, ebp
sar edx, 0x10
cmp dl, cl
jne 0x474276
mov dl, byte [esp + 0x12]
mov ecx, ebp
sar ecx, 8
cmp cl, dl
jne 0x474276
mov dl, byte [esp + 0x13]
mov cl, byte [eax]
cmp cl, dl
je 0x474282
mov ecx, dword [esp + 0x40]
add eax, 4
inc edi
cmp edi, ecx
jl 0x47424d
cmp edi, dword [esp + 0x28]
jle 0x474377
mov eax, dword [esi + 8]
mov ecx, dword [esp + 0x18]
cmp eax, ecx
jb 0x4742cb
push ebx
call dword [0x512394]
mov eax, dword [esp + 0x18]
push 2
add eax, 0x64
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x28]
add eax, 0x640
push eax
push ebx
mov dword [esp + 0x30], eax
call dword [0x51234c]
mov ebx, eax
push ebx
call dword [0x512390]
mov esi, eax
mov eax, dword [esp + 0x1c]
mov edx, dword [esi + 8]
mov ecx, dword [esp + 0x28]
add edx, 2
lea ebp, [eax + 1]
push ebp
push edi
shl edx, 4
push eax
add edx, esi
push ecx
push edx
call dword [0x512594]
mov eax, dword [esp + 0x28]
mov ecx, dword [esi + 0x10]
cmp eax, ecx
jge 0x4742fa
mov dword [esi + 0x10], eax
mov eax, dword [esp + 0x1c]
mov ecx, dword [esi + 0x14]
cmp eax, ecx
jge 0x474308
mov dword [esi + 0x14], eax
cmp edi, dword [esi + 0x18]
jle 0x474310
mov dword [esi + 0x18], edi
cmp ebp, dword [esi + 0x1c]
jle 0x474318
mov dword [esi + 0x1c], ebp
mov ecx, dword [esi + 8]
inc ecx
mov eax, ecx
mov dword [esi + 8], ecx
cmp eax, 0x7d0
jne 0x474377
mov eax, dword [esp + 0x24]
push esi
push eax
push 0
call dword [0x5120d0]
mov ebp, eax
mov eax, dword [esp + 0x14]
test eax, eax
je 0x474354
push 2
push ebp
push eax
push eax
call dword [0x512174]
push ebp
call dword [0x5120c0]
jmp 0x474358
mov dword [esp + 0x14], ebp
push 0
push 0
push 0x7fffffff
lea eax, [esi + 0x10]
push 0x7fffffff
push eax
mov dword [esi + 8], 0
call dword [0x512594]
mov edx, dword [esp + 0x40]
mov ecx, dword [esp + 0x20]
inc edi
cmp edi, edx
jl 0x47423e
mov ebp, dword [esp + 0x18]
mov eax, dword [esp + 0x88]
mov edx, dword [esp + 0x44]
sub ecx, eax
mov eax, dword [esp + 0x1c]
inc eax
mov dword [esp + 0x20], ecx
cmp eax, edx
mov dword [esp + 0x1c], eax
jl 0x474226
add ebp, 2
push esi
shl ebp, 4
push ebp
push 0
call dword [0x5120d0]
mov esi, eax
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4743dc
push 2
push esi
push eax
push eax
call dword [0x512174]
push esi
call dword [0x5120c0]
jmp 0x4743e0
mov dword [esp + 0x14], esi
push ebx
call dword [0x512394]
push ebx
call dword [0x512330]
mov ecx, dword [esp + 0x38]
mov esi, dword [esp + 0x34]
push ecx
push esi
call dword [0x51219c]
push esi
call dword [0x51215c]
mov esi, dword [esp + 0x2c]
mov edx, dword [esp + 0x30]
push edx
push esi
call dword [0x51219c]
push eax
call dword [0x5120c0]
mov ebx, dword [esp + 0x14]
push esi
call dword [0x51215c]
pop ebp
pop edi
mov eax, ebx
pop esi
pop ebx
add esp, 0x88
ret
pop edi
mov eax, ebx
pop esi
pop ebx
add esp, 0x88
ret