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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x50
mov esi, esp
mov dword [esi + 0x38], ebp
mov edx, dword [ebp + 8]
mov dword [esi + 0x3c], esp
mov dword [esi + 0x48], 0xffffffff
lea eax, [esi + 0x40]
mov dword [esi + 0x44], 0x401cc0
mov ecx, dword fs:[0]
mov dword [esi + 0x40], ecx
mov dword fs:[0], eax
mov eax, dword [edx + 0x3c]
mov eax, dword [eax + edx + 0x78]
mov ecx, dword [eax + edx + 0x18]
test ecx, ecx
je 0x40151d
mov dword [esi + 0x2c], eax
mov eax, dword [edx + eax + 0x20]
add eax, edx
mov dword [esi + 0xc], eax
test edx, edx
setne al
cmp dword [ebp + 0xc], 4
setae ah
and ah, al
mov byte [esi + 3], ah
dec ecx
mov dword [esi + 0x34], ecx
mov dword [esi + 4], 0
mov dword [esi + 8], edx
jmp 0x4013c0
push edx
push ecx
call fcn.0040d960
add esp, 8
sub dword [esi + 0x34], 1
setb al
or bl, al
add dword [esi + 8], 2
cmp bl, 1
je 0x401524
mov eax, dword [esi + 0xc]
mov ebx, dword [eax]
add ebx, dword [ebp + 8]
xorps xmm0, xmm0
movaps xmmword [esi + 0x10], xmm0
mov dword [esi + 0x24], 0
mov dword [esi + 0x20], 0
push ebx
call fcn.00415b70
add esp, 4
test eax, eax
js 0x40153c
mov edi, eax
cmp eax, 0xf
ja 0x401420
mov dword [esi + 0x20], edi
mov dword [esi + 0x24], 0xf
push edi
push ebx
lea eax, [esi + 0x10]
push eax
call fcn.00412450
add esp, 0xc
cmp byte [esi + 3], 0
jne 0x401491
jmp 0x4014e0
mov ecx, edi
or ecx, 0xf
cmp ecx, 0x17
mov eax, 0x16
cmovb ecx, eax
mov dword [esi + 0x48], 0xffffffff
cmp ecx, 0xfff
mov dword [esi + 0x30], ecx
jb 0x401460
lea eax, [ecx + 0x24]
push eax
call fcn.0040d96e
add esp, 4
lea ecx, [eax + 0x23]
and ecx, 0xffffffe0
mov dword [ecx - 4], eax
jmp 0x40146e
lea eax, [ecx + 1]
push eax
call fcn.0040d96e
add esp, 4
mov ecx, eax
mov dword [esi + 0x10], ecx
mov dword [esi + 0x20], edi
mov eax, dword [esi + 0x30]
mov dword [esi + 0x24], eax
push edi
push ebx
push ecx
mov ebx, ecx
call fcn.00412450
add esp, 0xc
mov byte [ebx + edi], 0
cmp byte [esi + 3], 0
je 0x4014e0
mov dword [esi + 0x48], 0
push 0x14d
lea eax, [esi + 0x10]
push eax
call fcn.00401240
add esp, 8
test eax, eax
je 0x4014e0
cmp eax, dword [ebp + 0xc]
jne 0x4014e0
mov edx, dword [ebp + 8]
mov ecx, dword [esi + 0x2c]
mov eax, dword [edx + ecx + 0x24]
mov edi, dword [esi + 8]
movzx eax, word [edi + eax]
mov ecx, dword [edx + ecx + 0x1c]
add ecx, edx
mov eax, dword [ecx + eax*4]
mov dword [esi + 4], eax
mov bl, 1
mov eax, dword [esi + 0x24]
cmp eax, 0x10
jb 0x4013aa
jmp 0x4014f2
add dword [esi + 0xc], 4
xor ebx, ebx
mov eax, dword [esi + 0x24]
cmp eax, 0x10
jb 0x4013aa
mov ecx, dword [esi + 0x10]
lea edx, [eax + 1]
cmp edx, 0x1000
jb 0x4013a0
mov edi, dword [ecx - 4]
add ecx, 0xfffffffc
sub ecx, edi
cmp ecx, 0x20
jae 0x401548
add eax, 0x24
mov edx, eax
mov ecx, edi
jmp 0x4013a0
mov dword [esi + 4], 0
mov eax, dword [esi + 4]
add eax, dword [ebp + 8]
mov ecx, dword [esi + 0x40]
mov dword fs:[0], ecx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov dword [esi + 0x48], 0xffffffff
call fcn.00402d70
mov dword [esi + 0x48], 1
call fcn.00415f17
nop word cs:[eax + eax]
push ebp
sub esp, 0xc
lea esi, [ebp - 0x4c]
mov ebp, dword [esi + 0x38]
lea ecx, [esi + 0x10]
call fcn.004025a0
add esp, 0xc
pop ebp
ret