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

Disassembly:
sub esp, 0xc
push ebx
mov ebx, dword [esp + 0x14]
mov ecx, dword [ebx + 0x48]
movzx eax, word [ecx + 0xc]
push ebp
xor ebp, ebp
test dword [esp + 0x24], 0x40000
push esi
push edi
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ebp
je 0x40785a
mov dword [esp + 0x14], ebp
movzx edx, word [esp + 0x14]
cmp edx, 3
ja case.default.0x40786c
mov eax, dword [esp + 0x24]
jmp dword [edx*4 + 0x407b00]
mov edx, 0x20
cmp dword [ecx + 4], edx
je 0x407887
mov dword [ecx + 4], edx
or dword [ebx + 0x15c], 4
mov edx, eax
sub edx, dword [ebx + 0x10]
cmp dword [ecx + 8], edx
je 0x40789b
mov dword [ecx + 8], edx
or dword [ebx + 0x15c], 0x10
xor edx, edx
mov dword [ecx + 0x20], ebp
mov dword [ecx + 0x24], ebp
mov word [ecx + 0x28], dx
mov word [ecx + 0x2a], dx
cmp dword [ecx + 4], 0x44
jae 0x407963
mov edx, dword [esp + 0x28]
mov edi, dword [ecx + 8]
xor esi, esi
sub eax, dword [ebx + 0x10]
sbb edx, dword [ebx + 0x14]
xor eax, eax
or eax, edx
je 0x407951
movzx eax, word [ecx + 0x28]
mov ebx, dword [ecx + 0x10]
cdq
xor edx, edx
or edx, ebx
mov ebx, dword [ecx + 0x18]
xor ebp, ebp
or eax, ebp
shl ebx, 4
add edx, ebx
adc eax, ebp
cmp eax, esi
jb 0x4078f6
ja 0x4078f2
cmp edx, edi
jbe 0x4078f6
mov edi, edx
mov esi, eax
movzx eax, word [ecx + 0x2a]
mov ebx, dword [ecx + 0x14]
cdq
xor edx, edx
or edx, ebx
mov ebx, dword [ecx + 0x1c]
xor ebp, ebp
or eax, ebp
shl ebx, 4
add edx, ebx
adc eax, ebp
cmp eax, esi
jb 0x40791e
ja 0x40791a
cmp edx, edi
jbe 0x40791e
mov edi, edx
mov esi, eax
mov ebx, dword [ecx + 0x20]
mov ebp, dword [ecx + 0x24]
mov eax, ebx
or eax, ebp
je 0x407944
mov eax, dword [ecx + 0x1c]
lea edx, [eax + eax]
xor eax, eax
add edx, ebx
adc eax, ebp
cmp eax, esi
jb 0x407944
ja 0x407940
cmp edx, edi
jbe 0x407944
mov edi, edx
mov esi, eax
mov ebx, dword [esp + 0x20]
or dword [ebx + 0x15c], 0x10
xor ebp, ebp
mov dword [ecx + 0x2c], edi
mov dword [ecx + 0x30], esi
mov dword [ecx + 0x3c], ebp
mov dword [ecx + 0x40], ebp
mov dword [ecx + 0x34], ebp
mov dword [ecx + 0x38], ebp
mov eax, dword [ecx + 0x3c]
mov edx, dword [ecx + 0x40]
mov esi, eax
or esi, edx
mov dword [ecx + 0x5c], ebp
mov dword [ecx + 0x60], ebp
mov dword [ecx + 0x64], ebp
mov dword [ecx + 0x68], ebp
je 0x4079a7
mov esi, dword [ecx + 0x34]
sub esi, eax
mov eax, dword [ecx + 0x38]
sbb eax, edx
mov dword [ecx + 0x60], eax
movzx eax, word [ecx + 0x28]
cdq
xor edx, edx
mov dword [ecx + 0x5c], esi
mov esi, dword [ecx + 0x10]
xor edi, edi
or edx, esi
or eax, edi
sub edx, dword [ecx + 0x3c]
sbb eax, dword [ecx + 0x40]
mov dword [ecx + 0x64], edx
mov dword [ecx + 0x68], eax
cmp word [esp + 0x14], 1
jb 0x407a27
movzx eax, word [ecx + 0x2a]
cdq
mov edx, dword [ecx + 0x14]
mov edi, eax
movzx eax, word [ecx + 0x28]
xor ebx, ebx
xor esi, esi
or esi, edx
or edi, ebx
mov ebx, dword [ecx + 0x10]
cdq
xor edx, edx
or edx, ebx
xor ebp, ebp
or eax, ebp
mov ebx, esi
sub ebx, edx
mov edx, edi
sbb edx, eax
mov eax, dword [ecx + 0x20]
mov dword [ecx + 0x44], ebx
mov dword [ecx + 0x48], edx
mov edx, dword [ecx + 0x24]
mov ebx, eax
or ebx, edx
je 0x407a0f
mov ebx, eax
sub ebx, esi
mov esi, edx
sbb esi, edi
mov dword [ecx + 0x50], esi
mov esi, dword [ecx + 0x2c]
sub esi, eax
mov eax, dword [ecx + 0x30]
sbb eax, edx
mov dword [ecx + 0x4c], ebx
mov ebx, dword [esp + 0x20]
mov dword [ecx + 0x54], esi
mov dword [ecx + 0x58], eax
jmp 0x407a45
mov edx, dword [ecx + 0x2c]
mov eax, dword [ecx + 0x30]
mov ebx, dword [esp + 0x20]
sub edx, esi
sbb eax, edi
mov dword [ecx + 0x4c], edx
mov dword [ecx + 0x50], eax
xor ebp, ebp
jmp 0x407a3f
mov edx, dword [ecx + 0x18]
mov eax, dword [ecx + 0x1c]
shl edx, 4
shl eax, 4
mov dword [ecx + 0x44], edx
mov dword [ecx + 0x48], ebp
mov dword [ecx + 0x4c], eax
mov dword [ecx + 0x50], ebp
mov dword [ecx + 0x58], ebp
mov dword [ecx + 0x54], ebp
xor eax, eax
mov dword [ecx + 0x6c], ebp
mov dword [ecx + 0x70], eax
mov dword [ecx + 0x74], eax
mov dword [ecx + 0x78], eax
mov dword [ecx + 0x7c], eax
mov dword [ecx + 0x80], eax
mov dword [ecx + 0x84], eax
mov dword [ecx + 0x88], eax
mov dword [ecx + 0x8c], eax
mov dword [ecx + 0x90], eax
mov dword [ecx + 0x94], eax
mov dword [ecx + 0x98], eax
mov dword [ecx + 0x9c], eax
mov dword [ecx + 0xa0], eax
mov dword [ecx + 0xa4], eax
mov dword [ecx + 0xa8], eax
mov dword [ecx + 0xac], eax
mov dword [ecx + 0xb0], eax
mov dword [ecx + 0xb4], eax
mov dword [ecx + 0xb8], eax
mov dword [ecx + 0xbc], eax
mov dword [ecx + 0xc0], eax
mov dword [ecx + 0xc4], eax
mov dword [ecx + 0xc8], eax
mov dword [ecx + 0xcc], eax
mov ebx, dword [ebx + 0x48]
lea ecx, [ebx + 0xc0]
push 0xc0
mov edi, ebx
call fcn.00408c90
add esp, 4
test al, al
jne case.default.0x40786c
mov dword [esp + 0x18], 0x570
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret