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

Disassembly:
sub esp, 8
mov edx, dword [esp + 0x30]
push ebx
xor ebx, ebx
cmp edx, 0xffffffff
push edi
mov dword [esp + 0xc], ecx
mov dword [esp + 8], ebx
je 0x4010f4
mov edi, dword [ecx + 8]
cmp edi, 0x7d0
jge 0x4010da
lea eax, [edi + edi*2]
shl eax, 4
add eax, edi
lea eax, [ecx + eax*4 + 0x3c]
cmp word [eax], bx
je 0x4010da
cmp edi, 0x7cf
jge 0x4010ea
inc edi
add eax, 0xc4
cmp edi, 0x7d0
jl 0x4010bf
cmp edi, dword [ecx + 4]
jl 0x4010e5
lea eax, [edi + 1]
mov dword [ecx + 4], eax
mov dword [ecx + 8], edi
jmp 0x401102
pop edi
xor eax, eax
pop ebx
add esp, 8
ret 0x2c
mov dword [esp + 0x38], 8
xor edi, edi
mov edx, dword [esp + 0x38]
lea eax, [edi + edi*2]
push esi
shl eax, 4
add eax, edi
cmp edx, 0x5b
lea esi, [ecx + eax*4]
mov word [esi + 0xd0], bx
jne 0x401133
mov eax, 1
mov dword [esp + 0xc], eax
mov word [esi + 0xd0], ax
mov dword [esp + 0x3c], eax
jmp 0x401209
cmp edx, 0x5c
jne 0x401155
mov eax, 1
mov dword [esp + 0x3c], 0x18
mov dword [esp + 0xc], eax
mov word [esi + 0xd0], ax
jmp 0x401209
cmp edx, 0x5d
jne 0x401175
mov eax, 1
mov word [esi + 0xd0], 2
mov dword [esp + 0xc], eax
mov dword [esp + 0x3c], eax
jmp 0x401209
cmp edx, 0x5e
jne 0x401195
mov dword [esp + 0xc], 1
mov word [esi + 0xd0], 2
mov dword [esp + 0x3c], 0x18
jmp 0x401209
cmp edx, 0x1b
jne 0x4011d1
movsx ecx, word [0xc6baa2]
mov eax, ecx
mov ebx, 0x50
cdq
idiv ebx
mov eax, dword [esp + 0x30]
lea edx, [eax + edx*4 - 0xa0]
mov eax, ecx
sar eax, 8
mov dword [esp + 0x30], edx
mov ecx, ebx
cdq
idiv ecx
mov eax, dword [esp + 0x34]
lea ecx, [eax + edx*4 - 0xa0]
jmp 0x401205
cmp edx, 0x20
jne 0x401209
movsx ecx, word [0xc6baa2]
mov eax, ecx
mov ebx, 0x30
cdq
idiv ebx
mov eax, dword [esp + 0x30]
lea edx, [eax + edx - 0x18]
mov eax, ecx
sar eax, 8
mov dword [esp + 0x30], edx
mov ecx, ebx
cdq
idiv ecx
mov eax, dword [esp + 0x34]
lea ecx, [eax + edx - 0x18]
mov dword [esp + 0x34], ecx
mov edx, dword [0xb089b0]
mov ebx, dword [esp + 0x2c]
mov dword [esi + 0x44], edx
mov ecx, dword [0xb089b0]
mov eax, dword [0xb08980]
mov dx, word [esp + 0x40]
inc ecx
push ebp
mov ebp, dword [esp + 0x28]
mov dword [0xb089b0], ecx
mov cx, word [esp + 0x1c]
mov dword [esi + 0x48], eax
mov ax, word [esp + 0x20]
mov word [esi + 0x3c], 1
mov word [esi + 0xb6], cx
mov word [esi + 0xb4], dx
mov edx, dword [esp + 0x2c]
mov cx, word [esp + 0x34]
mov word [esi + 0x40], ax
mov ax, word [esp + 0x38]
mov word [esi + 0x4c], bp
mov word [esi + 0x64], bp
mov word [esi + 0x4e], dx
mov word [esi + 0x66], dx
mov word [esi + 0x50], bx
mov word [esi + 0x68], bx
mov word [esi + 0x6a], bx
mov word [esi + 0x6c], bx
mov word [esi + 0x52], cx
mov cx, word [esp + 0x3c]
mov word [esi + 0x54], ax
lea eax, [edi + 1]
mov word [esi + 0x56], cx
lea ecx, [eax + eax*2]
shl ecx, 4
add ecx, eax
mov eax, dword [esp + 0x14]
mov word [eax + ecx*4], 0
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x38]
sub ecx, ebx
mov dword [esi + 0xa4], ecx
mov ecx, dword [esp + 0x34]
push eax
push ecx
push edx
push ebp
mov ecx, 0x116fd10
call fcn.0045ece0
mov edx, dword [0x116fd20]
xor eax, eax
mov dword [esi + 0x9c], edx
mov ecx, dword [0x1215de0]
cmp ecx, eax
mov dword [esi + 0x1c], eax
mov eax, dword [esp + 0x40]
cmp eax, 0xa
je 0x4012fe
cmp eax, 0xb
je 0x4012fe
cmp eax, 0xc
je 0x4012fe
cmp eax, 0xd
jne 0x401305
mov ecx, dword [esp + 0x24]
mov dword [esi + 0x1c], ecx
mov ecx, dword [esp + 0x14]
push eax
push edi
call fcn.004016d0
xor eax, eax
cmp word [esi + 0xd0], ax
je 0x401321
mov word [esi + 0x1a], 0x91
mov word [esi + 0x26], ax
mov word [esi + 0x28], ax
mov eax, dword [esp + 0x40]
cmp eax, 0x15
jne 0x40137a
cmp dword [esp + 0x44], 1
jne 0x40133f
mov word [esi + 0x28], 0xc8
movsx edx, word [0xc6baa2]
mov ecx, 0xc6baa0
mov dword [esi + 0xc0], edx
call fcn.0045c3e0
mov eax, dword [esp + 0x40]
cmp eax, 0x1d
jne 0x40139c
movsx eax, word [0xc6baa2]
cdq
mov ecx, 0x64
idiv ecx
add edx, 0x78
mov word [esi + 0xd0], dx
jmp 0x4013dc
cmp eax, 8
jne 0x40133f
mov eax, dword [esp + 0x1c]
mov edx, eax
shl edx, 6
add edx, eax
lea eax, [eax + edx*4]
mov ecx, dword [eax*4 + 0x12bc924]
mov dword [esi + 0xc0], ecx
jmp 0x4013dc
cmp eax, 0x1f
jne 0x4013b1
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x4013dc
mov word [esi + 0x24], 2
jmp 0x4013dc
cmp eax, 0xf
jne 0x4013dc
movsx eax, word [0xc6baa2]
cdq
mov ecx, 0x1f4
idiv ecx
add edx, 0x12c
mov word [esi + 0xd0], dx
mov edx, dword [esp + 0x24]
mov dword [esi + 0xc0], edx
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x34]
push eax
mov eax, dword [esp + 0x30]
push ecx
push edx
push ebx
mov ebx, dword [esp + 0x24]
push eax
push ebp
push edi
mov ecx, ebx
call fcn.00404e10
cmp word [esi + 0x3e], 0x18
pop ebp
jne 0x40140c
mov word [esi + 0x3e], 1
cmp word [esi + 0x3e], 0x19
jne 0x401419
mov word [esi + 0x3e], 7
mov eax, dword [esp + 0xc]
test eax, eax
je 0x40142a
mov word [esi + 0xba], 1
test edi, edi
je 0x40145b
push edi
mov ecx, ebx
call fcn.00401a00
push edi
mov ecx, ebx
call fcn.00407760
mov ebx, dword [0x61fabc]
mov dword [0x61fabc], edi
movsx ecx, word [esi + 0x3e]
call dword [ecx*4 + 0x53d400]
mov dword [0x61fabc], ebx
mov eax, edi
pop esi
pop edi
pop ebx
add esp, 8
ret 0x2c