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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0xec
mov eax, dword [esp + 0x100]
cmp dword [esp + 0x110], 0x5db
mov eax, dword [eax]
mov dword [esp + 0x58], eax
jbe 0x40bb9b
mov byte [esp + 0x6f], al
movzx ebp, al
mov edx, eax
mov eax, dword [esp + 0x10c]
mov dword [esp + 0x2c], ebp
mov dword [eax + 0x270], 0
lea ebx, [eax + 0x270]
mov dword [ebx + 0x68], 0
mov eax, dword [esp + 0x10c]
mov ecx, ebx
lea esi, [eax + 0x274]
xor eax, eax
mov edi, esi
and edi, 0xfffffffc
sub ecx, edi
add ecx, 0x6c
shr ecx, 2
rep stosd dword es:[edi], eax
cmp dl, 0xc
ja 0x40bb9b
mov eax, dword [esp + 0x108]
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x100
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x104]
mov dword [esp + 0x14], eax
lea eax, [esp + 0x70]
mov dword [esp + 0x10], eax
lea eax, [esp + 0x74]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x10c]
add eax, 0x4dc
mov dword [esp], eax
call fcn.0040a850
mov dword [esp + 0x4c], eax
cmp eax, 0xffffff88
ja 0x40bba3
mov eax, dword [esp + 0x70]
mov dword [esp + 0x30], eax
cmp eax, ebp
ja 0x40bb9b
mov ebp, dword [ebx + eax*4]
lea edi, [eax + 1]
mov dword [esp + 0x28], edi
test ebp, ebp
jne 0x40bbf6
mov ecx, dword [esp + 0x10c]
lea esi, [esi]
nop
mov edx, eax
lea eax, [eax - 1]
mov edi, dword [ecx + edx*4 + 0x26c]
test edi, edi
je 0x40b6e0
mov edi, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
sub ecx, dword [esp + 0x30]
sub edi, eax
add eax, ecx
mov dword [esp + 0x48], edi
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x10c]
add eax, 0x2a8
mov dword [esp + 0x38], eax
cmp edx, 1
jbe 0x40bc27
mov eax, esi
lea ebx, [ebx + edx*4]
xor ecx, ecx
lea esi, [esi]
nop
mov esi, ecx
add eax, 4
add ecx, dword [eax - 4]
mov dword [eax + 0x34], esi
cmp ebx, eax
jne 0x40b730
mov eax, dword [esp + 0x10c]
mov ebp, dword [esp + 0x74]
mov dword [esp + 0x5c], ecx
add eax, 0x2dc
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x10c]
mov dword [eax + 0x2a8], ecx
test ebp, ebp
je 0x40bc0d
mov edi, dword [esp + 0x38]
mov dword [esp + 0x38], edx
xor eax, eax
lea esi, [esi]
lea esi, [esi]
mov esi, dword [esp + 0x10c]
movzx ecx, byte [esi + eax + 0x4dc]
lea ebx, [edi + ecx*4]
mov edx, ecx
mov ecx, dword [ebx]
lea esi, [ecx + 1]
mov dword [ebx], esi
mov esi, dword [esp + 0x24]
lea ecx, [esi + ecx*2]
mov byte [ecx], al
add eax, 1
mov byte [ecx + 1], dl
cmp eax, ebp
jne 0x40b780
mov eax, dword [esp + 0x10c]
mov edx, dword [esp + 0x38]
mov ecx, dword [esp + 0x2c]
sub ecx, dword [esp + 0x30]
mov dword [eax + 0x2a8], 0
lea edi, [ecx - 1]
cmp edx, 1
jbe 0x40b851
mov ebx, dword [esp + 0x10c]
lea eax, [ecx*4]
add edi, edx
sub ebx, eax
xor eax, eax
lea esi, [esi]
nop
mov ebp, dword [ebx + ecx*4 + 0x274]
mov esi, eax
mov dword [ebx + ecx*4 + 4], esi
shl ebp, cl
add ecx, 1
add eax, ebp
cmp edi, ecx
jne 0x40b7f0
mov edi, dword [esp + 0x34]
cmp dword [esp + 0x48], edi
jae 0x40b851
mov ecx, dword [esp + 0x48]
mov eax, dword [esp + 0x10c]
mov ebp, edi
imul ebx, ecx, 0x34
lea esi, [eax + edx*4]
lea edi, [eax + 4]
lea esi, [esi]
nop
mov eax, edi
lea esi, [esi]
mov edx, dword [eax]
add eax, 4
shr edx, cl
mov dword [eax + ebx - 4], edx
cmp esi, eax
jne 0x40b838
add ecx, 1
add ebx, 0x34
cmp ecx, ebp
jne 0x40b830
mov eax, dword [esp + 0x28]
sub eax, dword [esp + 0x2c]
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x10c]
mov eax, dword [eax]
mov dword [esp + 0x78], eax
mov eax, dword [esp + 0x10c]
mov eax, dword [eax + 4]
mov dword [esp + 0x7c], eax
mov eax, dword [esp + 0x10c]
mov eax, dword [eax + 8]
mov dword [esp + 0x80], eax
mov eax, dword [esp + 0x10c]
mov eax, dword [eax + 0xc]
mov dword [esp + 0x84], eax
mov eax, dword [esp + 0x10c]
mov eax, dword [eax + 0x10]
mov dword [esp + 0x88], eax
mov eax, dword [esp + 0x10c]
mov eax, dword [eax + 0x14]
mov dword [esp + 0x8c], eax
mov eax, dword [esp + 0x10c]
mov eax, dword [eax + 0x18]
mov dword [esp + 0x90], eax
mov eax, dword [esp + 0x10c]
mov eax, dword [eax + 0x1c]
mov dword [esp + 0x94], eax
mov eax, dword [esp + 0x10c]
mov eax, dword [eax + 0x20]
mov dword [esp + 0x98], eax
mov eax, dword [esp + 0x10c]
mov eax, dword [eax + 0x24]
mov dword [esp + 0x9c], eax
mov eax, dword [esp + 0x10c]
mov eax, dword [eax + 0x28]
mov dword [esp + 0xa0], eax
mov eax, dword [esp + 0x10c]
mov eax, dword [eax + 0x2c]
mov dword [esp + 0xa4], eax
mov eax, dword [esp + 0x10c]
mov eax, dword [eax + 0x30]
mov dword [esp + 0xa8], eax
mov eax, dword [esp + 0x5c]
test eax, eax
je 0x40bb6b
mov eax, dword [esp + 0x2c]
mov edi, dword [esp + 0x5c]
sub eax, dword [esp + 0x28]
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x24]
add edi, edi
mov dword [esp + 0x64], edi
mov dword [esp + 0x3c], eax
add eax, edi
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x100]
add eax, 4
mov dword [esp + 0x68], eax
lea esi, [esi]
mov eax, dword [esp + 0x3c]
mov edx, 1
movzx edi, byte [eax]
movzx esi, byte [eax + 1]
mov word [esp + 0x2c], di
mov edi, dword [esp + 0x28]
mov eax, dword [esp + esi*4 + 0x78]
mov dword [esp + 0x44], esi
sub edi, esi
add esi, dword [esp + 0x54]
mov ecx, esi
shl edx, cl
lea ebx, [edx + eax]
mov dword [esp + 0x40], ebx
cmp esi, dword [esp + 0x48]
jb 0x40bbb8
mov ebx, dword [esp + 0x60]
mov edx, dword [esp + 0x10c]
lea ecx, [ebx + edi]
mov ebx, 1
test ecx, ecx
cmovg ebx, ecx
mov ebp, dword [edx + ebx*4 + 0x2a4]
mov edx, dword [esp + 0x100]
mov dword [esp + 0x24], ebx
lea edx, [edx + eax*4 + 4]
imul eax, edi, 0x34
add eax, dword [esp + 0x10c]
mov ebx, dword [eax]
mov dword [esp + 0xac], ebx
mov ebx, dword [eax + 4]
mov dword [esp + 0xb0], ebx
mov ebx, dword [eax + 8]
mov dword [esp + 0xb4], ebx
mov ebx, dword [eax + 0xc]
mov dword [esp + 0xb8], ebx
mov ebx, dword [eax + 0x10]
mov dword [esp + 0xbc], ebx
mov ebx, dword [eax + 0x14]
mov dword [esp + 0xc0], ebx
mov ebx, dword [eax + 0x18]
mov dword [esp + 0xc4], ebx
mov ebx, dword [eax + 0x1c]
mov dword [esp + 0xc8], ebx
mov ebx, dword [eax + 0x20]
mov dword [esp + 0xcc], ebx
mov ebx, dword [eax + 0x24]
mov dword [esp + 0xd0], ebx
mov ebx, dword [eax + 0x28]
mov dword [esp + 0xd4], ebx
mov ebx, dword [eax + 0x2c]
mov eax, dword [eax + 0x30]
mov dword [esp + 0xd8], ebx
mov dword [esp + 0xdc], eax
cmp ecx, 1
jle 0x40baad
mov eax, dword [esp + 0x24]
mov ecx, edi
mov ebx, dword [esp + eax*4 + 0xac]
test ebx, ebx
je 0x40baad
mov dword [esp + 0x24], edi
movzx edi, word [esp + 0x2c]
mov eax, edx
lea ebx, [edx + ebx*4]
lea esi, [esi]
mov word [eax], di
add eax, 4
mov byte [eax - 2], cl
mov byte [eax - 1], 1
cmp ebx, eax
jne 0x40ba98
mov edi, dword [esp + 0x24]
cmp ebp, dword [esp + 0x5c]
je 0x40bb4c
mov eax, edi
sub esi, dword [esp + 0x28]
mov byte [esp + 0x34], al
mov eax, dword [esp + 0x10c]
mov dword [esp + 0x30], esi
lea esi, [eax + ebp*2]
mov eax, dword [esp + 0x64]
add eax, dword [esp + 0x10c]
mov dword [esp + 0x38], eax
nop
movzx edi, byte [esi + 0x2dd]
mov ebx, dword [esp + 0x30]
mov ebp, dword [esp + 0x28]
lea ecx, [edi + ebx]
mov ebx, 1
mov eax, dword [esp + edi*4 + 0xac]
shl ebx, cl
movzx ecx, byte [esi + 0x2dc]
sub ebp, edi
add ebx, eax
shl ecx, 8
add cx, word [esp + 0x2c]
mov word [esp + 0x24], cx
movzx ecx, byte [esp + 0x34]
add ebp, ecx
nop
movzx ecx, word [esp + 0x24]
add eax, 1
mov byte [edx + eax*4 - 1], 2
mov word [edx + eax*4 - 4], cx
mov ecx, ebp
mov byte [edx + eax*4 - 2], cl
cmp ebx, eax
ja 0x40bb20
mov dword [esp + edi*4 + 0xac], ebx
add esi, 2
cmp esi, dword [esp + 0x38]
jne 0x40bae0
mov eax, dword [esp + 0x44]
mov edi, dword [esp + 0x40]
add dword [esp + 0x3c], 2
mov dword [esp + eax*4 + 0x78], edi
mov eax, dword [esp + 0x3c]
cmp dword [esp + 0x50], eax
jne 0x40b978
movzx eax, byte [esp + 0x6f]
mov edx, dword [esp + 0x58]
mov edi, dword [esp + 0x100]
shl eax, 0x10
and edx, 0xff00ffff
or edx, eax
mov eax, edx
mov ah, 1
mov dword [edi], eax
mov eax, dword [esp + 0x4c]
add esp, 0xec
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0x4c], 0xffffffd4
mov eax, dword [esp + 0x4c]
add esp, 0xec
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, edi
mov edi, dword [esp + 0x40]
cmp eax, edi
jae 0x40bb4c
mov esi, dword [esp + 0x100]
movzx ebx, word [esp + 0x2c]
lea eax, [esi + eax*4 + 4]
mov esi, dword [esp + 0x68]
lea ecx, [esi + edi*4]
lea esi, [esi]
mov word [eax], bx
add eax, 4
mov byte [eax - 2], dl
mov byte [eax - 1], 1
cmp ecx, eax
jne 0x40bbe0
jmp 0x40bb4c
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x48], 1
mov edx, edi
mov dword [esp + 0x34], eax
jmp 0x40b708
mov dword [eax + 0x2a8], 0
mov ecx, dword [esp + 0x2c]
sub ecx, dword [esp + 0x30]
lea edi, [ecx - 1]
jmp 0x40b7d3
mov eax, dword [esp + 0x10c]
mov ebp, dword [esp + 0x74]
mov dword [esp + 0x5c], 0
add eax, 0x2dc
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x10c]
mov dword [eax + 0x2a8], 0
test ebp, ebp
jne 0x40b76c
jmp 0x40b851