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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x4c
mov ebx, dword [esp + 0x74]
mov eax, dword [esp + 0x78]
mov ebp, dword [esp + 0x68]
mov esi, dword [esp + 0x6c]
mov edx, dword [esp + 0x70]
neg ebx
and ebx, 3
cmp ebx, eax
ja 0x40b470
sub eax, ebx
cmp eax, 0x2eb
jbe 0x40b470
cmp esi, 0xff
mov eax, 0xffffffd2
ja 0x40b475
add ebx, dword [esp + 0x74]
lea eax, [edx + 1]
cmp eax, 1
mov byte [ebx + 0x1e0], 0
jbe 0x40b43d
cmp eax, 2
mov byte [ebx + 0x1e1], dl
je 0x40b43d
lea edi, [edx - 1]
cmp eax, 3
mov ecx, edi
mov byte [ebx + 0x1e2], cl
je 0x40b43d
lea edi, [edx - 2]
cmp eax, 4
mov ecx, edi
mov byte [ebx + 0x1e3], cl
je 0x40b43d
lea edi, [edx - 3]
cmp eax, 5
mov ecx, edi
mov byte [ebx + 0x1e4], cl
je 0x40b43d
lea edi, [edx - 4]
cmp eax, 6
mov ecx, edi
mov byte [ebx + 0x1e5], cl
je 0x40b43d
lea edi, [edx - 5]
cmp eax, 7
mov ecx, edi
mov byte [ebx + 0x1e6], cl
je 0x40b43d
lea edi, [edx - 6]
cmp eax, 8
mov ecx, edi
mov byte [ebx + 0x1e7], cl
je 0x40b43d
lea edi, [edx - 7]
cmp eax, 9
mov ecx, edi
mov byte [ebx + 0x1e8], cl
je 0x40b43d
lea edi, [edx - 8]
cmp eax, 0xa
mov ecx, edi
mov byte [ebx + 0x1e9], cl
je 0x40b43d
lea edi, [edx - 9]
cmp eax, 0xb
mov ecx, edi
mov byte [ebx + 0x1ea], cl
je 0x40b43d
lea edi, [edx - 0xa]
cmp eax, 0xc
mov ecx, edi
mov byte [ebx + 0x1eb], cl
je 0x40b43d
sub edx, 0xb
mov byte [ebx + 0x1ec], dl
test esi, esi
je 0x40b460
xor eax, eax
mov ecx, ebp
movzx edx, byte [ecx + eax*4 + 4]
movzx edx, byte [ebx + edx + 0x1e0]
mov byte [ebx + eax + 0x1ed], dl
add eax, 1
cmp esi, eax
jne 0x40b445
mov eax, dword [esp + 0x64]
test eax, eax
jne 0x40b47d
mov eax, 0xffffffba
jmp 0x40b475
mov eax, 0xffffffff
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, ebx
mov dword [esp + 0x3c], 0xc
mov eax, 0xffffffff
neg edx
and edx, 3
jne 0x40b475
cmp esi, 1
jbe 0x40b60e
lea eax, [ebx + 0x1ed]
lea edi, [ebx + 0x190]
mov dword [esp + 0xc], esi
mov dword [esp + 0x20], eax
mov dword [esp + 8], eax
lea eax, [esp + 0x3c]
mov dword [esp], edi
mov dword [esp + 4], eax
call fcn.0040a310
cmp esi, eax
je 0x40b60e
cmp eax, 1
je 0x40b60e
mov eax, dword [esp + 0x3c]
mov dword [esp + 4], esi
lea ebp, [ebx + 0x1c4]
mov dword [esp], 6
mov dword [esp + 8], eax
call fcn.00409090
mov edx, eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x14], 0
mov dword [esp + 4], edx
mov dword [esp + 0xc], esi
mov dword [esp + 8], edi
mov dword [esp], ebp
mov dword [esp + 0x10], eax
mov dword [esp + 0x24], edx
call fcn.004090f0
cmp eax, 0xffffff88
mov edx, dword [esp + 0x24]
ja 0x40b475
mov eax, dword [esp + 0x64]
mov dword [esp + 0x10], edx
mov dword [esp + 8], ebp
mov dword [esp + 0x28], edx
sub eax, 1
mov ecx, eax
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x60]
mov dword [esp + 4], ecx
lea edi, [eax + 1]
mov eax, dword [esp + 0x3c]
mov dword [esp], edi
mov dword [esp + 0xc], eax
call fcn.00408a60
cmp eax, 0xffffff88
mov ecx, eax
mov edx, dword [esp + 0x28]
ja 0x40b475
lea eax, [edi + eax]
mov dword [esp + 0x14], 0xa4
mov dword [esp + 0xc], edx
mov dword [esp + 4], ebp
mov dword [esp], ebx
mov dword [esp + 0x28], eax
lea eax, [ebx + 0xec]
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 8], eax
call fcn.00408630
cmp eax, 0xffffff88
mov ecx, dword [esp + 0x2c]
ja 0x40b475
mov eax, dword [esp + 0x20]
mov ebp, dword [esp + 0x28]
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], esi
mov dword [esp + 8], eax
mov eax, dword [esp + 0x24]
mov dword [esp], ebp
sub eax, ecx
mov dword [esp + 4], eax
call fcn.00409980
cmp eax, 0xffffff88
mov edx, eax
ja 0x40b475
test eax, eax
je 0x40b60e
mov eax, ebp
add eax, edx
sub eax, edi
cmp eax, 0xffffff88
ja 0x40b475
mov edx, esi
shr edx, 1
cmp eax, edx
jae 0x40b60e
cmp eax, 1
jbe 0x40b60e
mov edi, dword [esp + 0x60]
mov byte [edi], al
add eax, 1
jmp 0x40b475
cmp esi, 0x80
ja 0x40b470
lea eax, [esi + 1]
shr eax, 1
add eax, 1
cmp dword [esp + 0x64], eax
jb 0x40b468
mov edi, dword [esp + 0x60]
lea edx, [esi + 0x7f]
test esi, esi
mov byte [edi], dl
mov byte [ebx + esi + 0x1ed], 0
je 0x40b475
lea edx, [esi - 1]
mov ebp, dword [esp + 0x60]
shr edx, 1
lea edi, [edx + edx + 2]
xor edx, edx
movzx ecx, byte [ebx + edx + 0x1ed]
mov esi, edx
shr esi, 1
shl ecx, 4
add cl, byte [ebx + edx + 0x1ee]
add edx, 2
cmp edx, edi
mov byte [ebp + esi + 1], cl
jne 0x40b654
jmp 0x40b475