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

Disassembly:
sub esp, 0x25c
mov eax, dword [0x1013567c]
xor eax, esp
mov dword [esp + 0x258], eax
mov edx, dword [esp + 0x260]
xor eax, eax
push ebx
mov dword [esp + 4], eax
mov dword [esp + 0x14], eax
mov ecx, dword [edx]
push ebp
push esi
xor esi, esi
mov dword [esp + 0x14], edx
imul ebx, dword [ecx + 4], 0x2c
lea ebp, [esp + 0x64]
add ebx, ecx
mov dword [esp + 0x10], esi
push edi
mov edi, dword [edx + 4]
mov dword [esp + 0x1c], esi
mov eax, dword [ebx + 8]
add eax, 0x18
mov dword [esp + 0x2c], eax
xor eax, eax
test byte [edx + 0x18], 2
mov word [esp + 0x68], ax
jne 0x1003a5eb
mov eax, dword [ebx + 0x24]
test al, 1
jne 0x1003a5eb
test eax, 0xc000
je 0x1003a5f3
mov dword [esp + 0x14], 1
push 1
push 0x81
lea eax, [esp + 0x70]
push eax
push dword [edx + 0xc]
push edi
call fcn.1003c5f0
test eax, eax
jne 0x1003a62e
lea ecx, [esp + 0x68]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1003a613
sub ecx, edx
lea ebp, [esp + 0x68]
sar ecx, 1
lea ebp, [ebp + ecx*2]
mov dword [esp + 0x20], ebp
mov edx, dword [esp + 0x14]
test edx, edx
je 0x1003a770
push 1
push 0x38
lea eax, [esp + 0x38]
push eax
mov eax, dword [esp + 0x24]
push 0
push dword [eax + 0xc]
push edi
call fcn.1003c4a0
test eax, eax
jne 0x1003a848
push eax
push eax
push dword [esp + 0x3c]
push edi
call fcn.1003c7f0
test eax, eax
jne 0x1003a701
mov edi, edi
push 0
push 0
lea eax, [esp + 0x2c]
push eax
push 4
lea eax, [esp + 0x38]
push eax
push dword [esp + 0x58]
push dword [esp + 0x4c]
push edi
call fcn.1003cb80
test eax, eax
jne 0x1003a701
mov eax, dword [esp + 0x28]
push 0
cmp eax, dword [ebx + 0x2c]
je 0x1003a6af
push 1
push dword [esp + 0x3c]
push edi
call fcn.1003c7f0
test eax, eax
je 0x1003a670
jmp 0x1003a701
push 0
mov eax, 0x2e
mov word [ebp], ax
lea eax, [esp + 0x2c]
push eax
push 0x80
add ebp, 2
push ebp
push dword [esp + 0x54]
mov dword [esp + 0x28], ebp
push dword [esp + 0x4c]
push edi
call fcn.1003cb80
test eax, eax
je 0x1003a6ea
xor eax, eax
mov word [ebp - 2], ax
mov dword [esp + 0x10], eax
jmp 0x1003a701
mov eax, dword [esp + 0x24]
mov ecx, 0x40
shr eax, 1
cmp eax, ecx
cmovb ecx, eax
xor eax, eax
mov word [ebp + ecx*2], ax
push dword [esp + 0x34]
push edi
call fcn.1003bde0
mov eax, dword [esp + 0x10]
test eax, eax
je 0x1003a848
mov edx, dword [esp + 0x14]
cmp dword [esp + 0x274], 0xffffdfb9
jne 0x1003a848
mov ecx, dword [esp + 0x20]
test ecx, ecx
je 0x1003a848
movzx ebp, word [ecx]
xor eax, eax
mov word [ecx], ax
test dword [ebx + 0x28], 0x4000
mov eax, dword [esp + 0x10]
mov dword [esp + 0x14], esi
jne 0x1003a774
test edx, edx
je 0x1003a759
test eax, eax
jne 0x1003a774
mov esi, dword [ebx + 0x14]
test esi, esi
jne 0x1003a763
mov esi, dword [ebx + 0x18]
mov dword [esp + 0x1c], 1
jmp 0x1003a801
xor eax, eax
jmp 0x1003a71b
mov ebx, dword [esp + 0x2c]
lea ecx, [esp + 0x14]
push 0
push 0
push 0
push ecx
push 0xffdc
push dword [ebx + 8]
push 0x10002a60
push eax
lea eax, [esp + 0x88]
push eax
mov eax, dword [esp + 0x3c]
push 0x10002410
push dword [eax + 8]
push edi
call fcn.1002cb90
test eax, eax
je 0x1003a7f2
push 0
push 0
push 0
lea eax, [esp + 0x20]
push eax
mov eax, dword [esp + 0x20]
push 0xffdc
push dword [ebx + 8]
push 0x10002a40
push eax
lea eax, [esp + 0x88]
push eax
mov eax, dword [esp + 0x3c]
push 0x10002410
push dword [eax + 8]
push edi
call fcn.1002cb90
test eax, eax
jne 0x1003a801
mov dword [esp + 0x1c], 1
mov eax, dword [esp + 0x14]
mov esi, dword [ebx + 8]
shr eax, 1
xor ecx, ecx
mov word [esi + eax*2], cx
mov ax, word [0x1000a3e4]
mov word [esp + 0x10], ax
push dword [esp + 0x10]
push esi
call fcn.1011736c
add esp, 8
test eax, eax
je 0x1003a841
mov edi, 0x2e
mov word [eax], di
mov ax, word [0x1000a3e4]
mov word [esp + 0x10], ax
push dword [esp + 0x10]
push esi
call fcn.1011736c
add esp, 8
test eax, eax
jne 0x1003a822
mov eax, dword [esp + 0x20]
mov word [eax], bp
xor eax, eax
cmp dword [esp + 0x1c], eax
push 0
push 0
setne al
push eax
push dword [esp + 0x280]
lea eax, [esp + 0x78]
push 0
push esi
push eax
mov eax, dword [esp + 0x34]
push dword [eax + 4]
call fcn.100377a0
mov ecx, dword [esp + 0x268]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.1011720d
add esp, 0x25c
ret 8