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

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 8]
sub esp, 0x3c
test ecx, ecx
je 0x405367
and dword [ecx], 0
mov edx, dword [esi + 4]
push ebx
push edi
test edx, edx
je 0x405660
mov eax, dword [esi + 8]
test eax, eax
je 0x405660
mov edi, 0x14c
cmp word [esi], di
jne 0x405395
mov edi, dword [eax + 0x3c]
mov eax, dword [eax + 0x38]
mov dword [ebp - 8], edi
mov dword [ebp - 0x14], eax
test ecx, ecx
je 0x405421
movzx ecx, word [esi + 0x8c]
mov edx, dword [edx + 0x3c]
mov eax, ecx
imul eax, eax, 0x28
lea edx, [eax + edx + 0x108]
mov eax, dword [ebp - 8]
lea ebx, [eax - 1]
test edx, ebx
je 0x4053c5
mov edi, ebx
not edi
and edx, edi
add edx, eax
test ecx, ecx
je 0x4053f2
mov eax, dword [esi + 0x90]
add eax, 0x10
mov dword [ebp - 0x34], ecx
mov edi, dword [eax]
test ebx, edi
je 0x4053e6
mov ecx, ebx
not ecx
and ecx, edi
add ecx, dword [ebp - 8]
jmp 0x4053e8
mov ecx, edi
add edx, ecx
add eax, 0x28
dec dword [ebp - 0x34]
jne 0x4053d5
mov eax, dword [esi + 0x9c]
add eax, edx
je 0x405660
call fcn.0040360a
mov ebx, eax
mov dword [ebp - 0x34], ebx
test ebx, ebx
je 0x405660
mov eax, dword [esi + 4]
push dword [eax + 0x3c]
push eax
push ebx
call fcn.00403659
jmp 0x405424
mov ebx, dword [ebp - 0x34]
cmp dword [ebp + 8], 0
mov eax, dword [esi + 4]
mov eax, dword [eax + 0x3c]
mov dword [ebp - 4], eax
lea edx, [ebx + eax]
jne 0x405439
mov edx, dword [esi + 8]
mov ecx, 0x14c
cmp word [esi], cx
jne 0x40545b
cmp dword [ebp + 8], 0
lea edi, [ecx - 0x54]
je 0x405456
push edi
push dword [esi + 8]
push edx
call fcn.00403659
add eax, edi
add dword [ebp - 4], edi
mov edi, dword [ebp - 8]
xor ecx, ecx
add ebx, eax
mov dword [ebp - 0x38], ebx
movzx ebx, word [esi + 0x8c]
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x30], ecx
mov ecx, ebx
imul ecx, ecx, 0x28
add eax, ecx
dec edi
test eax, edi
je 0x40548e
not edi
and eax, edi
add eax, dword [ebp - 8]
add dword [ebp - 4], ecx
mov ecx, dword [ebp - 0x14]
dec ecx
test dword [ebp - 4], ecx
je 0x4054a5
not ecx
and ecx, dword [ebp - 4]
add ecx, dword [ebp - 0x14]
mov dword [ebp - 4], ecx
mov ecx, dword [esi + 0x9c]
cmp eax, ecx
cmovb eax, ecx
and dword [ebp - 0x18], 0
mov dword [ebp - 0x3c], eax
test ebx, ebx
je 0x4055ee
and dword [ebp - 0x10], 0
cmp dword [ebp + 8], 0
je 0x4054e4
mov ecx, dword [ebp - 0x10]
mov ebx, dword [esi + 0x90]
mov edi, dword [ebp - 0x38]
push 0x28
add ebx, ecx
add edi, ecx
push ebx
push edi
call fcn.00403659
jmp 0x4054ed
mov edi, dword [esi + 0x90]
add edi, dword [ebp - 0x10]
mov ecx, dword [edi + 8]
mov ebx, dword [edi + 0x10]
test ecx, ecx
je 0x4054fe
mov dword [ebp - 0xc], ecx
cmp ecx, ebx
ja 0x405501
mov dword [ebp - 0xc], ebx
mov ecx, dword [ebp - 4]
mov dword [edi + 0xc], ecx
test ebx, ebx
je 0x405524
mov ecx, dword [ebp - 8]
dec ecx
test ecx, ebx
je 0x40551c
not ecx
and ecx, ebx
add ecx, dword [ebp - 8]
jmp 0x40551e
mov ecx, ebx
mov dword [edi + 0x10], ecx
mov dword [edi + 0x14], eax
cmp dword [ebp + 8], 0
je 0x40554e
mov ecx, dword [esi + 0x90]
mov ebx, dword [ebp - 0x10]
push dword [ebx + ecx + 0x10]
mov ecx, dword [esi + 0x94]
mov ebx, dword [ebp - 0x18]
push dword [ecx + ebx*4]
mov ecx, dword [ebp - 0x34]
add ecx, eax
push ecx
call fcn.00403659
mov ecx, dword [edi + 0x24]
mov dword [ebp - 0x1c], ecx
and dword [ebp - 0x1c], 0x20
je 0x40556c
cmp dword [ebp - 0x2c], 0
jne 0x405566
mov ebx, dword [ebp - 4]
mov dword [ebp - 0x2c], ebx
mov ebx, dword [edi + 0x10]
add dword [ebp - 0x20], ebx
test cl, 0x40
je 0x40559c
cmp dword [ebp - 0x30], 0
jne 0x405583
cmp dword [ebp - 0x1c], 0
jne 0x405583
mov ecx, dword [ebp - 4]
mov dword [ebp - 0x30], ecx
mov ecx, dword [ebp - 8]
mov ebx, dword [ebp - 0xc]
dec ecx
test ebx, ecx
je 0x405597
not ecx
and ecx, ebx
add ecx, dword [ebp - 8]
jmp 0x405599
mov ecx, ebx
add dword [ebp - 0x24], ecx
test byte [edi + 0x24], 0x80
je 0x4055bb
mov ecx, dword [ebp - 8]
mov ebx, dword [ebp - 0xc]
dec ecx
test ebx, ecx
je 0x4055b6
not ecx
and ecx, ebx
add ecx, dword [ebp - 8]
jmp 0x4055b8
mov ecx, ebx
add dword [ebp - 0x28], ecx
add eax, dword [edi + 0x10]
mov ecx, dword [ebp - 0x14]
mov edi, dword [ebp - 0xc]
dec ecx
test edi, ecx
je 0x4055d2
not ecx
and ecx, edi
add ecx, dword [ebp - 0x14]
jmp 0x4055d4
mov ecx, edi
add dword [ebp - 4], ecx
movzx ecx, word [esi + 0x8c]
inc dword [ebp - 0x18]
add dword [ebp - 0x10], 0x28
cmp dword [ebp - 0x18], ecx
jb 0x4054c3
mov cx, word [esi + 0x8c]
mov word [edx + 6], cx
mov ecx, 0x14c
cmp word [esi], cx
jne 0x405652
cmp dword [ebp + 8], 0
je 0x40561b
push 0x80
lea ecx, [esi + 0xc]
push ecx
lea ecx, [edx + 0x78]
push ecx
call fcn.00403659
mov ecx, dword [esi + 8]
mov ecx, dword [ecx + 0x28]
and dword [edx + 0x58], 0
mov dword [edx + 0x28], ecx
mov ecx, dword [ebp - 0x20]
mov dword [edx + 0x1c], ecx
mov ecx, dword [ebp - 0x24]
mov dword [edx + 0x20], ecx
mov ecx, dword [ebp - 0x28]
mov dword [edx + 0x24], ecx
mov ecx, dword [ebp - 0x2c]
mov dword [edx + 0x2c], ecx
mov ecx, dword [ebp - 0x30]
mov dword [edx + 0x30], ecx
mov ecx, dword [ebp - 4]
mov dword [edx + 0x50], ecx
mov ecx, dword [ebp - 0x3c]
mov dword [edx + 0x54], ecx
mov ecx, dword [ebp + 8]
test ecx, ecx
je 0x405662
mov edx, dword [ebp - 0x34]
mov dword [ecx], edx
jmp 0x405662
xor eax, eax
pop edi
pop ebx
leave
ret 4