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

Disassembly:
sub esp, 0x54
mov eax, dword [0x1004f860]
xor eax, esp
mov dword [esp + 0x50], eax
movzx eax, word [esp + 0x68]
push ebp
push esi
mov esi, dword [esp + 0x6c]
test dword [esi + 0x14], 0x4000
push edi
mov edi, dword [esp + 0x64]
mov ebp, ecx
mov dword [esp + 0x1c], edi
mov dword [esp + 0x10], eax
jne 0x10031a04
movzx ecx, byte [esp + 0x78]
mov edx, dword [ebp]
mov edx, dword [edx + 0x1c]
push ecx
mov ecx, dword [esp + 0x6c]
push eax
mov eax, dword [esp + 0x74]
push esi
push eax
push ecx
push edi
mov ecx, ebp
call edx
mov eax, edi
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.1003779c
add esp, 0x54
ret 0x18
mov eax, dword [esi + 0x30]
push ebx
mov ebx, dword [eax]
push 0
lea ecx, [esp + 0x28]
mov dword [esp + 0x14], ebx
call fcn.10037a8e
mov eax, dword [ebx + 4]
cmp eax, 0xffffffff
jae 0x10031a25
inc eax
mov dword [ebx + 4], eax
lea ecx, [esp + 0x24]
call fcn.10038a58
lea ecx, [esp + 0x10]
push ecx
call fcn.10031450
add esp, 4
push 0
lea ecx, [esp + 0x1c]
mov dword [esp + 0x14], eax
call fcn.10037a8e
mov eax, dword [ebx + 4]
test eax, eax
je 0x10031a5a
cmp eax, 0xffffffff
jae 0x10031a5a
dec eax
mov dword [ebx + 4], eax
mov edi, dword [ebx + 4]
neg edi
sbb edi, edi
not edi
lea ecx, [esp + 0x18]
and edi, ebx
call fcn.10038a58
xor ebx, ebx
cmp edi, ebx
je 0x10031a7e
mov edx, dword [edi]
mov eax, dword [edx]
push 1
mov ecx, edi
call eax
xor ecx, ecx
cmp byte [esp + 0x7c], cl
mov word [esp + 0x28], cx
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x44]
mov dword [esp + 0x3c], 7
mov dword [esp + 0x38], ebx
mov edx, dword [ecx]
push eax
je 0x10031aa7
mov edx, dword [edx + 0x14]
jmp 0x10031aaa
mov edx, dword [edx + 0x10]
call edx
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x2c]
call fcn.10031740
cmp dword [esp + 0x58], 8
jb 0x10031ace
mov ecx, dword [esp + 0x44]
push ecx
call sub.MSVCR100.dll_void___cdecl_operator_delete_void__
add esp, 4
mov edi, dword [esi + 0x20]
mov ecx, dword [esp + 0x38]
cmp dword [esi + 0x24], ebx
jl 0x10031ae8
jg 0x10031ae0
cmp edi, ebx
jbe 0x10031ae8
cmp edi, ecx
jbe 0x10031ae8
sub edi, ecx
jmp 0x10031aea
xor edi, edi
mov edx, dword [esi + 0x14]
and edx, 0x1c0
cmp edx, 0x40
je 0x10031b2c
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x70]
mov edx, dword [esp + 0x6c]
push edi
push eax
push ecx
push edx
lea eax, [esp + 0x28]
push eax
push ebp
call fcn.1002f400
mov ecx, dword [eax]
mov dword [esp + 0x84], ecx
mov edx, dword [eax + 4]
mov ecx, dword [esp + 0x50]
add esp, 0x18
mov dword [esp + 0x70], edx
xor edi, edi
cmp dword [esp + 0x3c], 8
mov eax, dword [esp + 0x28]
jae 0x10031b3b
lea eax, [esp + 0x28]
push ecx
mov ecx, dword [esp + 0x70]
push eax
mov eax, dword [esp + 0x78]
push eax
push ecx
lea edx, [esp + 0x28]
push edx
push ebp
call fcn.1002f380
mov ecx, dword [eax]
mov edx, dword [esp + 0x2c]
push edi
push edx
mov dword [esp + 0x8c], ecx
mov eax, dword [eax + 4]
push eax
mov dword [esi + 0x20], ebx
mov dword [esi + 0x24], ebx
mov esi, dword [esp + 0x44]
push ecx
push esi
push ebp
mov dword [esp + 0xa0], eax
call fcn.1002f400
add esp, 0x30
cmp dword [esp + 0x3c], 8
pop ebx
jb 0x10031b96
mov eax, dword [esp + 0x24]
push eax
call sub.MSVCR100.dll_void___cdecl_operator_delete_void__
add esp, 4
mov ecx, dword [esp + 0x5c]
pop edi
mov eax, esi
pop esi
pop ebp
xor ecx, esp
call fcn.1003779c
add esp, 0x54
ret 0x18