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

Disassembly:
jmp 0x415be0
sub esp, 0x58
mov eax, dword [0x523e00]
xor eax, esp
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x60]
mov edx, dword [esp + 0x6c]
push ebx
mov ebx, dword [esp + 0x7c]
mov dword [esp + 0x24], eax
mov dword [esp + 0x20], edx
push ebp
mov ebp, dword [esp + 0x7c]
push esi
push edi
test ebx, ebx
je 0x415c20
mov al, byte [ebp]
cmp al, 0x2b
je 0x415c19
cmp al, 0x2d
jne 0x415c20
mov edi, 1
jmp 0x415c22
xor edi, edi
mov eax, dword [edx + 0x14]
and eax, 0xe00
mov dword [esp + 0x14], edi
cmp eax, 0x800
jne 0x415c56
lea eax, [edi + 2]
cmp eax, ebx
ja 0x415c56
cmp byte [edi + ebp], 0x30
jne 0x415c56
mov cl, byte [edi + ebp + 1]
cmp cl, 0x78
je 0x415c50
cmp cl, 0x58
jne 0x415c56
mov edi, eax
mov dword [esp + 0x14], edi
mov eax, dword [edx + 0x30]
mov esi, dword [eax + 4]
mov ecx, esi
mov dword [esp + 0x24], esi
mov eax, dword [esi]
call dword [eax + 4]
lea eax, [esp + 0x20]
push eax
call fcn.004033cd
add esp, 4
mov dword [esp + 0x18], eax
test esi, esi
je 0x415c8f
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 8]
mov ecx, eax
test ecx, ecx
je 0x415c8f
mov eax, dword [ecx]
push 1
call dword [eax]
push 0
push ebx
lea ecx, [esp + 0x3c]
call fcn.004053f8
cmp dword [esp + 0x48], 7
lea eax, [esp + 0x34]
mov ecx, dword [esp + 0x18]
cmova eax, dword [esp + 0x34]
push eax
lea eax, [ebx + ebp]
mov edx, dword [ecx]
push eax
push ebp
call dword [edx + 0x2c]
mov edx, dword [esp + 0x2c]
mov eax, dword [edx + 0x30]
mov ecx, dword [eax + 4]
mov dword [esp + 0x24], ecx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [esp + 0x20]
push eax
call fcn.00405295
mov ecx, dword [esp + 0x28]
add esp, 4
mov ebp, eax
test ecx, ecx
je 0x415cf3
mov eax, dword [ecx]
call dword [eax + 8]
mov ecx, eax
test ecx, ecx
je 0x415cf3
mov eax, dword [ecx]
push 1
call dword [eax]
mov eax, dword [ebp]
lea ecx, [esp + 0x4c]
push ecx
mov ecx, ebp
call dword [eax + 0x14]
cmp dword [esp + 0x60], 0xf
lea esi, [esp + 0x4c]
cmova esi, dword [esp + 0x4c]
mov dword [esp + 0x18], esi
mov al, byte [esi]
cmp al, 0x7f
je 0x415eef
test al, al
jle 0x415eef
mov eax, dword [ebp]
mov ecx, ebp
call dword [eax + 0x10]
movzx eax, ax
mov dword [esp + 0x28], eax
mov al, byte [esi]
cmp al, 0x7f
je 0x415eef
mov ebp, dword [esp + 0x34]
test al, al
jle 0x415ef3
movsx ecx, al
mov eax, ebx
sub eax, edi
cmp ecx, eax
jae 0x415ef3
mov edi, dword [esp + 0x44]
sub ebx, ecx
cmp edi, ebx
jb 0x41611b
mov esi, dword [esp + 0x48]
mov eax, esi
sub eax, edi
mov dword [esp + 0x20], esi
cmp eax, 1
jb 0x415db2
lea eax, [edi + 1]
cmp esi, 7
mov dword [esp + 0x44], eax
lea eax, [esp + 0x34]
cmova eax, ebp
sub edi, ebx
lea esi, [eax + ebx*2]
lea eax, [edi*2 + 2]
push eax
lea eax, [esi + 2]
push esi
push eax
call fcn.004057bd
mov eax, dword [esp + 0x34]
add esp, 0xc
mov word [esi], ax
mov ebp, dword [esp + 0x34]
jmp 0x415ecd
mov eax, 0x7ffffffe
sub eax, edi
cmp eax, 1
jb 0x416116
lea ecx, [edi + 1]
or ecx, 7
cmp ecx, 0x7ffffffe
jbe 0x415dd7
mov ecx, 0x7ffffffe
jmp 0x415df5
mov edx, esi
mov eax, 0x7ffffffe
shr edx, 1
sub eax, edx
cmp esi, eax
jbe 0x415ded
mov ecx, 0x7ffffffe
jmp 0x415df5
lea eax, [esi + edx]
cmp ecx, eax
cmovb ecx, eax
lea eax, [esp + 0x10]
mov dword [esp + 0x10], ecx
push eax
lea eax, [esp + 0x38]
push eax
call fcn.0040320b
mov ebp, eax
add esp, 8
lea eax, [edi + 1]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x48], eax
lea eax, [ebx + ebx]
lea ecx, [eax + ebp]
mov dword [esp + 0x10], ecx
push eax
cmp esi, 7
jbe 0x415e93
mov esi, dword [esp + 0x38]
push esi
push ebp
call fcn.00405641
mov ecx, dword [esp + 0x1c]
sub edi, ebx
mov eax, dword [esp + 0x34]
mov word [ecx], ax
lea eax, [edi*2 + 2]
push eax
lea eax, [ebx + ebx]
add eax, esi
push eax
lea eax, [ecx + 2]
push eax
call fcn.00405641
mov eax, dword [esp + 0x38]
add esp, 0x18
lea ecx, [eax*2 + 2]
cmp ecx, 0x1000
jb 0x415e87
mov edx, dword [esi - 4]
add ecx, 0x23
sub esi, edx
lea eax, [esi - 4]
cmp eax, 0x1f
ja 0x416120
mov esi, edx
push ecx
push esi
call fcn.00401a28
add esp, 8
jmp 0x415ec9
lea eax, [esp + 0x38]
push eax
push ebp
call fcn.00405641
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x40]
mov eax, dword [esp + 0x34]
sub edi, ebx
mov word [ecx], ax
lea eax, [edi*2 + 2]
push eax
lea eax, [ebx + ebx]
add eax, edx
push eax
lea eax, [ecx + 2]
push eax
call fcn.00405641
add esp, 0x18
mov dword [esp + 0x34], ebp
mov esi, dword [esp + 0x18]
cmp byte [esi + 1], 0
lea eax, [esi + 1]
mov edi, dword [esp + 0x14]
cmovg esi, eax
mov dword [esp + 0x18], esi
mov al, byte [esi]
cmp al, 0x7f
jne 0x415d41
jmp 0x415ef3
mov ebp, dword [esp + 0x34]
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x44]
mov dword [esp + 0x20], eax
cmp dword [ecx + 0x24], 0
mov esi, dword [ecx + 0x20]
jl 0x415f16
jg 0x415f0e
test esi, esi
je 0x415f16
cmp esi, eax
jbe 0x415f16
sub esi, eax
jmp 0x415f18
xor esi, esi
mov eax, dword [ecx + 0x14]
mov ebx, dword [esp + 0x6c]
and eax, 0x1c0
cmp eax, 0x40
je 0x415fe5
cmp eax, 0x100
je 0x415f8f
push esi
push dword [esp + 0x84]
lea eax, [esp + 0x20]
push dword [esp + 0x80]
push dword [esp + 0x80]
push eax
push ebx
call fcn.004014c4
xor esi, esi
cmp dword [esp + 0x60], 7
push edi
mov edx, dword [eax]
mov ecx, dword [eax + 4]
lea eax, [esp + 0x50]
cmova eax, dword [esp + 0x50]
push eax
push ecx
push edx
lea eax, [esp + 0x40]
mov dword [esp + 0x9c], edx
push eax
push ebx
mov dword [esp + 0xa8], ecx
call fcn.00404cf5
add esp, 0x30
jmp 0x41600f
cmp dword [esp + 0x48], 7
lea eax, [esp + 0x34]
push edi
cmova eax, ebp
push eax
push dword [esp + 0x80]
lea eax, [esp + 0x24]
push dword [esp + 0x80]
push eax
push ebx
call fcn.00404cf5
push esi
push dword [esp + 0x9c]
mov ecx, dword [eax]
mov eax, dword [eax + 4]
push eax
mov dword [esp + 0x9c], eax
lea eax, [esp + 0x3c]
push ecx
push eax
push ebx
mov dword [esp + 0xa4], ecx
call fcn.004014c4
add esp, 0x30
xor esi, esi
jmp 0x41600f
cmp dword [esp + 0x48], 7
lea eax, [esp + 0x34]
push edi
cmova eax, ebp
push eax
push dword [esp + 0x80]
lea eax, [esp + 0x24]
push dword [esp + 0x80]
push eax
push ebx
call fcn.00404cf5
add esp, 0x18
mov edx, dword [eax]
mov ecx, dword [eax + 4]
lea eax, [esp + 0x34]
cmp dword [esp + 0x48], 7
mov ebp, dword [esp + 0x20]
cmova eax, dword [esp + 0x34]
sub ebp, edi
push ebp
mov dword [esp + 0x78], edx
mov dword [esp + 0x7c], ecx
lea eax, [eax + edi*2]
push eax
push ecx
push edx
lea eax, [esp + 0x30]
push eax
push ebx
call fcn.00404cf5
mov edx, dword [esp + 0x44]
push esi
push dword [esp + 0x9c]
mov ecx, dword [eax]
mov eax, dword [eax + 4]
mov esi, dword [esp + 0x50]
push eax
push ecx
push esi
push ebx
mov dword [esp + 0xa4], ecx
mov dword [esp + 0xa8], eax
mov dword [edx + 0x20], 0
mov dword [edx + 0x24], 0
call fcn.004014c4
mov ecx, dword [esp + 0x90]
add esp, 0x30
cmp ecx, 0xf
jbe 0x4160b4
mov edx, dword [esp + 0x4c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4160aa
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x416120
push ecx
push edx
call fcn.00401a28
add esp, 8
mov ecx, dword [esp + 0x48]
mov dword [esp + 0x5c], 0
mov dword [esp + 0x60], 0xf
mov byte [esp + 0x4c], 0
cmp ecx, 7
jbe 0x416101
mov edx, dword [esp + 0x34]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4160f7
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x416120
push ecx
push edx
call fcn.00401a28
add esp, 8
mov ecx, dword [esp + 0x64]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040303a
add esp, 0x58
ret
call fcn.00403855
call fcn.00402590
call fcn.0040472d
int3