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

Disassembly:
sub esp, 0x20
push ebx
push ebp
push esi
mov esi, dword [esp + 0x30]
xor eax, eax
push edi
mov edi, dword [esp + 0x38]
xor ecx, ecx
xor ebp, ebp
mov dword [esp + 0x10], ecx
mov dword [esp + 0x18], eax
mov dword [esp + 0x28], eax
cmp dword [edi], 0xffffffff
jne 0x525181
mov edx, dword [esi + 0x54]
test edx, edx
je 0x525174
mov ecx, dword [edi + 4]
mov dword [esp + 0x10], ecx
xor ebx, ebx
test edx, edx
sete bl
mov dword [esp + 0x18], ebx
jmp 0x5251a4
mov edx, dword [edi + 4]
cmp edx, 0xffffffff
jne 0x52519b
mov dword [esp + 0x28], 1
mov dword [esp + 0x18], 1
jmp 0x5251a4
test edx, edx
cmovne ecx, edx
mov dword [esp + 0x10], ecx
xor ecx, ecx
mov word [esi + 0x7e], cx
nop word [eax + eax]
test eax, eax
je 0x5251be
push eax
push esi
call fcn.00521910
add esp, 8
push ebp
push esi
call fcn.005216a0
mov ebp, eax
add esp, 8
mov dword [esp + 0x14], ebp
test ebp, ebp
je 0x5254cf
movzx eax, word [ebp + 0xc]
xor ecx, ecx
sub eax, 1
mov dword [esp + 0x1c], 0xffffffff
mov dword [esp + 0x24], ecx
mov ebx, ecx
mov dword [esp + 0x20], eax
js 0x5252c2
movsx edx, word [esp + 0x3c]
mov dword [esp + 0x2c], edx
lea edi, [eax + ecx]
movzx eax, word [esi + 0x72]
push 0
push eax
sar edi, 1
movzx eax, word [ebp + edi*2 + 0x1a]
add eax, 0x20
add eax, ebp
push eax
mov eax, dword [esp + 0x44]
push edx
add eax, 8
push eax
push esi
call fcn.005263f0
mov edx, dword [esp + 0x28]
add esp, 0x18
test eax, eax
jne 0x525255
test edx, edx
je 0x52525d
cmp dword [esi + 0x54], eax
je 0x52525d
movzx eax, word [ebp + edi*2 + 0x1a]
mov eax, dword [eax + ebp + 0x1c]
cmp edx, eax
jae 0x52524c
or eax, 0xffffffff
jmp 0x52525d
jbe 0x5252b5
mov eax, 1
jmp 0x52525d
cmp dword [esi + 0x38], 0
jne 0x52525d
neg eax
cmp dword [esp + 0x18], 0
je 0x52526d
mov ecx, eax
not ecx
shr ecx, 0x1f
jmp 0x525274
xor ecx, ecx
test eax, eax
setg cl
test ecx, ecx
je 0x525289
mov eax, dword [esp + 0x20]
lea ecx, [edi + 1]
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x24], ecx
jmp 0x5252a8
test eax, eax
jne 0x525297
test edx, edx
mov eax, 1
cmove ebx, eax
mov ecx, dword [esp + 0x24]
lea eax, [edi - 1]
mov edx, edi
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], edx
cmp ecx, eax
jg 0x5252bc
mov edx, dword [esp + 0x2c]
jmp 0x525200
mov ebx, 1
jmp 0x5252c6
mov edi, edx
test edx, edx
jns 0x5252c6
movzx edi, word [ebp + 0xc]
movzx eax, di
mov dword [esp + 0x24], eax
mov eax, dword [ebp]
mov dword [esp + 0x2c], eax
movzx eax, word [esi + 0x7c]
cmp word [esi + 0x7e], ax
jne 0x525317
test ax, ax
jne 0x5252fb
mov eax, 0x20
push 0x100
mov word [esi + 0x7c], ax
call fcn.004a67c0
add esp, 4
jmp 0x525314
add eax, 0x20
mov word [esi + 0x7c], ax
movzx eax, ax
shl eax, 3
push eax
push dword [esi + 0x78]
call fcn.004a6a70
add esp, 8
mov dword [esi + 0x78], eax
movzx ecx, word [esi + 0x7e]
mov eax, dword [esi + 0x78]
mov edx, dword [esp + 0x2c]
mov dword [eax + ecx*8], edx
movzx ecx, word [esi + 0x7e]
mov eax, dword [esi + 0x78]
mov edx, dword [esp + 0x24]
mov word [eax + ecx*8 + 4], dx
inc word [esi + 0x7e]
mov ecx, dword [esp + 0x10]
test ebx, ebx
je 0x52534b
test ecx, ecx
je 0x52534b
cmp dword [esi + 0x54], 0
jne 0x5253ad
movzx eax, word [ebp + edi*2 + 0x1a]
mov ebp, dword [eax + ebp + 0x18]
mov eax, dword [esp + 0x14]
test ebp, ebp
jne 0x5251b0
mov ebp, eax
test ecx, ecx
je 0x5253ad
cmp dword [esi + 0x54], 0
jne 0x5253ad
movzx eax, word [ebp + 0xc]
mov edx, edi
cmp edi, eax
jge 0x5253ad
lea ecx, [ebp + 0x1a]
lea ecx, [ecx + edi*2]
nop dword [eax]
movzx eax, word [ecx]
mov esi, dword [esp + 0x10]
cmp dword [eax + ebp + 0x1c], esi
mov esi, dword [esp + 0x34]
je 0x52539f
movzx eax, word [ebp + 0xc]
inc edx
add ecx, 2
cmp edx, eax
jl 0x525380
jmp 0x5253ad
movzx ecx, word [esi + 0x7e]
mov edi, edx
mov eax, dword [esi + 0x78]
mov word [eax + ecx*8 - 4], dx
movzx eax, word [esi + 0x72]
push eax
push dword [esi + 0x84]
push edi
push ebp
call fcn.005214f0
push ebp
push esi
call fcn.00521910
mov ecx, dword [esp + 0x28]
add esp, 0x18
test ecx, ecx
je 0x525439
cmp dword [esi + 0x54], 0
jne 0x5254b1
mov ebx, 1
mov eax, dword [esi + 0x84]
cmp ecx, dword [eax + 4]
je 0x5254b1
push esi
call fcn.00525b70
add esp, 4
test eax, eax
je 0x52546b
movzx eax, word [esi + 0x72]
push 0
push eax
mov eax, dword [esi + 0x84]
add eax, 8
push eax
movzx eax, word [esp + 0x48]
push eax
mov eax, dword [esp + 0x48]
add eax, 8
push eax
push esi
call fcn.005263f0
xor ebx, ebx
add esp, 0x18
test eax, eax
sete bl
test eax, eax
jne 0x5254b1
mov ecx, dword [esp + 0x10]
jmp 0x5253e0
cmp dword [esp + 0x28], 0
je 0x525448
push esi
call fcn.00525e00
jmp 0x525464
cmp dword [esp + 0x18], 0
jne 0x5254b1
test ebx, ebx
jne 0x5254b1
mov eax, dword [esi + 0x84]
cmp dword [eax + 4], ebx
jne 0x5254b1
push esi
call fcn.00525b70
add esp, 4
test eax, eax
jne 0x525482
xor ebx, ebx
mov eax, 1
pop edi
mov dword [esi + 0x60], eax
mov dword [esi + 0x5c], eax
mov eax, ebx
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
movzx eax, word [esi + 0x72]
push 0
push eax
mov eax, dword [esi + 0x84]
add eax, 8
push eax
movzx eax, word [esp + 0x48]
push eax
mov eax, dword [esp + 0x48]
add eax, 8
push eax
push esi
call fcn.005263f0
add esp, 0x18
mov ebx, eax
neg ebx
sbb ebx, ebx
inc ebx
mov eax, dword [esi + 0x84]
cmp dword [eax + 4], 0
je 0x52546d
xor eax, eax
pop edi
mov dword [esi + 0x60], eax
mov dword [esi + 0x5c], eax
mov eax, ebx
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x20
ret