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

Disassembly:
push 0xffffffffffffffff
push 0x5aa8b0
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x628d00]
xor eax, esp
push eax
lea eax, [esp + 0x70]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [esp + 0x18], ebx
mov esi, dword [ebx + 4]
mov ecx, dword [ebx + 8]
test esi, esi
je 0x5042bf
lea eax, [ecx + esi*4 - 4]
jmp 0x5042b0
cmp dword [eax], 0
jne 0x504386
sub eax, 4
dec esi
jne 0x5042b0
xor eax, eax
lea edi, [eax - 1]
test edi, edi
jle 0x504545
mov ebp, 1
push ebp
mov dword [esp + 0x54], ebp
call fcn.004956b0
push 4
call fcn.004932e0
mov esi, eax
mov dword [esp + 0x28], esi
mov dword [esp + 0x5c], esi
mov dword [esi], 2
push ebp
mov dword [esp + 0x84], 0
mov dword [esp + 0x38], ebp
call fcn.004956b0
push 4
call fcn.004932e0
add esp, 0x10
mov ebp, eax
mov dword [esp + 0x30], ebp
cmp eax, esi
je 0x50431f
mov ecx, dword [esi]
mov dword [eax], ecx
mov eax, edi
cdq
sub eax, edx
sar eax, 1
mov byte [esp + 0x78], 1
mov dword [esp + 0x1c], 1
mov dword [esp + 0x24], eax
cmp eax, 1
jge 0x5043aa
mov ecx, dword [esp + 0x2c]
xor eax, eax
mov edi, ebp
push ebp
mov byte [esp + 0x7c], 0
rep stosd dword es:[edi], eax
call fcn.00493190
xor eax, eax
mov edi, esi
mov ecx, 1
push esi
mov dword [esp + 0x80], 0xffffffff
rep stosd dword es:[edi], eax
call fcn.00493190
add esp, 8
mov al, 1
mov ecx, dword [esp + 0x70]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x68
ret
test esi, esi
je 0x5042bf
lea eax, [ecx + esi*4 - 4]
push eax
call fcn.00488ab0
dec esi
shl esi, 5
add esp, 4
add eax, esi
jmp 0x5042c1
mov ebx, dword [esp + 0x18]
lea edx, [esp + 0x40]
push edx
lea ecx, [esp + 0x2c]
call fcn.00501b70
push ebx
push eax
lea eax, [esp + 0x3c]
push eax
mov byte [esp + 0x84], 2
call fcn.004a39c0
add esp, 0xc
mov ebx, eax
lea ecx, [esp + 0x28]
mov byte [esp + 0x78], 3
cmp ecx, ebx
je 0x50443c
mov esi, dword [ebx + 4]
mov ecx, dword [esp + 0x2c]
cmp ecx, esi
jne 0x5043ed
mov ecx, ebp
jmp 0x50441c
xor eax, eax
mov edi, ebp
push ebp
rep stosd dword es:[edi], eax
call fcn.00493190
push esi
call fcn.004956b0
add esp, 8
test esi, esi
jne 0x50440a
xor eax, eax
jmp 0x50441a
lea edx, [esi*4]
push edx
call fcn.004932e0
add esp, 4
mov ecx, eax
mov edx, dword [ebx + 8]
lea eax, [esi*4]
push eax
push edx
push eax
mov ebp, ecx
push ecx
mov dword [esp + 0x40], ebp
mov dword [esp + 0x3c], esi
call fcn.00531d59
add esp, 0x10
mov edi, dword [esp + 0x3c]
mov ecx, dword [esp + 0x38]
xor eax, eax
push edi
mov byte [esp + 0x7c], 2
rep stosd dword es:[edi], eax
call fcn.00493190
mov edi, dword [esp + 0x4c]
mov ecx, dword [esp + 0x48]
xor eax, eax
push edi
mov byte [esp + 0x80], 1
rep stosd dword es:[edi], eax
call fcn.00493190
lea eax, [esp + 0x54]
push eax
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x74]
push edx
call fcn.004aa850
mov ecx, dword [esp + 0x2c]
push ecx
push eax
lea edx, [esp + 0x74]
push edx
mov byte [esp + 0x98], 4
call fcn.00503f80
add esp, 0x20
mov esi, eax
lea ecx, [esp + 0x17]
mov byte [esp + 0x78], 5
call fcn.00503820
push eax
mov ecx, esi
call fcn.00500b70
mov edi, dword [esp + 0x60]
mov ecx, dword [esp + 0x5c]
test al, al
sete bl
xor eax, eax
push edi
mov byte [esp + 0x7c], 4
rep stosd dword es:[edi], eax
call fcn.00493190
mov edi, dword [esp + 0x70]
mov ecx, dword [esp + 0x6c]
xor eax, eax
push edi
mov byte [esp + 0x80], 1
rep stosd dword es:[edi], eax
call fcn.00493190
add esp, 8
test bl, bl
jne 0x50450d
mov eax, dword [esp + 0x1c]
inc eax
mov dword [esp + 0x1c], eax
cmp eax, dword [esp + 0x24]
jle 0x5043a6
mov esi, dword [esp + 0x20]
jmp 0x50433c
mov ecx, dword [esp + 0x2c]
xor eax, eax
mov edi, ebp
push ebp
mov byte [esp + 0x7c], 0
rep stosd dword es:[edi], eax
call fcn.00493190
mov edx, dword [esp + 0x24]
mov edi, edx
xor eax, eax
mov ecx, 1
push edx
mov dword [esp + 0x80], 0xffffffff
rep stosd dword es:[edi], eax
call fcn.00493190
add esp, 8
xor al, al
mov ecx, dword [esp + 0x70]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x68
ret