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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x5875a4]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
mov edi, dword [ebp + 8]
xor esi, esi
mov dword [ebp - 0x2c], edi
push ebx
mov eax, dword [edi + 0xc]
mov ecx, dword [eax + 0x24]
mov eax, 0xaaaaaaab
add ecx, ecx
mul ecx
shr edx, 1
xor eax, eax
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x28], eax
movsx ecx, byte [edi + 0x44]
mov ebx, dword [edi + 0x74]
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x20], ebx
test ecx, ecx
jne 0x413f35
cmp byte [ebx + 0xc], cl
je 0x414097
mov esi, dword [ebx + 0x34]
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebx + 0x48]
mov dword [ebp - 0x18], esi
test byte [ecx + 0x1c], 4
mov edx, dword [ecx + 0x14]
je 0x413dd0
mov eax, dword [edx + 0x18]
cmp eax, dword [ecx + 0x18]
jb 0x413dd0
cmp dword [edx + 0x60], 0
je 0x413e06
push ecx
call fcn.0046ade0
jmp 0x413df6
mov esi, dword [edx + 0x28]
test esi, esi
jne 0x413eae
mov eax, dword [edx + 0x94]
push ecx
cmp eax, dword [edx + 0x98]
jbe 0x413df1
call fcn.0042b000
jmp 0x413df6
call fcn.0042c1a0
mov esi, eax
add esp, 4
test esi, esi
jne 0x413eae
mov esi, dword [ebp - 0x18]
push 0
push dword [ebx + 4]
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x24]
push eax
push esi
call fcn.004120b0
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x24]
push ebx
call fcn.0041b780
mov eax, dword [ebp - 0x1c]
add esp, 0x20
cmp byte [esi + 0x11], 0
mov dword [ebp - 0x1c], eax
je 0x413e4b
lea ecx, [ebp - 0x18]
push ecx
push dword [ebx + 4]
push 5
push eax
push esi
call fcn.0042dd70
add esp, 0x14
mov esi, dword [ebp - 0x18]
test esi, esi
jne 0x413eae
movzx eax, byte [ebx + 0xc]
mov esi, dword [ebp - 0x24]
add eax, eax
push eax
lea eax, [ebx + 0x1a]
push eax
lea eax, [esi + 0x1a]
push eax
call fcn.00521b30
movzx eax, byte [ebx + 0xc]
shl eax, 2
push eax
lea eax, [ebx + 0x24]
push eax
lea eax, [esi + 0x24]
push eax
call fcn.00521b30
mov al, byte [ebx + 0xc]
mov byte [esi + 0xc], al
mov eax, dword [esi + 0x38]
movzx eax, byte [eax]
and eax, 0xfffffff7
push eax
push ebx
call fcn.0047ad70
movzx ecx, byte [ebx + 9]
add esp, 0x20
mov eax, dword [ebx + 0x38]
mov edx, dword [ebp - 0x1c]
bswap edx
mov dword [ecx + eax + 8], edx
mov dword [edi + 0x7c], esi
xor esi, esi
jmp 0x413f1b
mov eax, dword [ebp - 0x24]
mov dword [edi + 0x7c], 0
test eax, eax
je 0x413f13
mov ecx, dword [eax + 0x48]
test byte [ecx + 0x1c], 0x20
je 0x413f0a
mov edx, dword [ecx + 0x14]
dec dword [edx + 0x78]
mov eax, dword [edx + 0x88]
mov dword [ecx + 0x10], eax
mov edi, dword [edx + 0x3c]
mov eax, dword [edx + 0x98]
mov dword [edx + 0x88], ecx
push dword [ecx + 4]
mov ecx, dword [ecx + 0x18]
mov ebx, dword [edi]
dec ecx
cdq
push edx
push eax
push 0
push ecx
call fcn.004db9e0
push edx
push eax
mov eax, dword [ebx + 0x48]
push edi
call eax
mov ebx, dword [ebp - 0x20]
add esp, 0x10
mov edi, dword [ebp - 0x2c]
jmp 0x413f13
push ecx
call fcn.0044cef0
add esp, 4
test esi, esi
jne 0x414097
mov edx, dword [ebp - 0x30]
xor eax, eax
mov byte [edi + 0x44], 1
mov dword [edi + 0x46], eax
mov eax, dword [edi + 0x7c]
mov dword [edi + 0x78], ebx
mov dword [edi + 0x74], eax
jmp 0x413d84
cmp byte [ebx + 0xc], 0
jne 0x413f47
movzx eax, word [ebx + 0x14]
cmp eax, edx
jle 0x414097
mov esi, dword [edi + ecx*4 + 0x74]
movzx eax, word [edi + ecx*2 + 0x46]
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x1c], eax
mov ecx, dword [esi + 0x48]
test byte [ecx + 0x1c], 4
mov edx, dword [ecx + 0x14]
je 0x413f78
mov eax, dword [edx + 0x18]
cmp eax, dword [ecx + 0x18]
jb 0x413f78
cmp dword [edx + 0x60], 0
je 0x413faa
push ecx
call fcn.0046ade0
jmp 0x413f9e
mov esi, dword [edx + 0x28]
test esi, esi
jne 0x414026
mov eax, dword [edx + 0x94]
push ecx
cmp eax, dword [edx + 0x98]
jbe 0x413f99
call fcn.0042b000
jmp 0x413f9e
call fcn.0042c1a0
mov esi, eax
add esp, 4
test esi, esi
jne 0x414026
mov esi, dword [ebp - 0x20]
cmp byte [ebx + 3], 0
je 0x413fe1
cmp byte [ebx + 0xc], 1
jne 0x413fe1
mov ax, word [ebx + 0x1a]
cmp ax, word [ebx + 0x16]
jne 0x413fe1
cmp dword [esi + 4], 1
je 0x413fe1
movzx eax, word [esi + 0x16]
cmp eax, dword [ebp - 0x1c]
jne 0x413fe1
lea eax, [ebp - 0x14]
push eax
push ebx
push esi
call fcn.004155c0
add esp, 0xc
mov esi, eax
jmp 0x414026
mov eax, dword [edi + 0xc]
push dword [eax + 0x20]
call fcn.0042d2a0
movzx ecx, byte [edi + 3]
and ecx, 1
mov dword [ebp - 0x20], eax
push ecx
xor ecx, ecx
cmp dword [ebp - 0x18], 1
sete cl
push ecx
push eax
push dword [ebp - 0x1c]
push esi
call fcn.004140c0
mov esi, eax
add esp, 0x18
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x414020
push eax
call fcn.0042d730
add esp, 4
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x28], eax
mov edx, dword [ebx + 0x48]
mov byte [ebx + 0xc], 0
test byte [edx + 0x1c], 0x20
je 0x414075
mov eax, dword [edx + 0x14]
dec dword [eax + 0x78]
mov ecx, dword [eax + 0x88]
mov dword [edx + 0x10], ecx
mov edi, dword [eax + 0x3c]
mov dword [eax + 0x88], edx
push dword [edx + 4]
mov ecx, dword [edx + 0x18]
mov eax, dword [eax + 0x98]
dec ecx
mov ebx, dword [edi]
cdq
push edx
push eax
push 0
push ecx
call fcn.004db9e0
push edx
push eax
mov eax, dword [ebx + 0x48]
push edi
call eax
mov edi, dword [ebp - 0x2c]
add esp, 0x10
jmp 0x41407e
push edx
call fcn.0044cef0
add esp, 4
dec byte [edi + 0x44]
movsx eax, byte [edi + 0x44]
mov edx, dword [ebp - 0x30]
mov eax, dword [edi + eax*4 + 0x78]
mov dword [edi + 0x74], eax
test esi, esi
je 0x413d84
mov eax, dword [ebp - 0x28]
pop ebx
test eax, eax
je 0x4140a8
push eax
call fcn.0042d730
add esp, 4
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
xor ecx, ebp
pop esi
call fcn.004db63a
mov esp, ebp
pop ebp
ret