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

Disassembly:
sub esp, 0x60
push esi
push edi
mov edi, dword [esp + 0x78]
lea ecx, [esp + 0x5c]
push ecx
mov esi, 1
lea eax, [esp + 0x20]
push edi
mov dword [esp + 0x24], 0
mov dword [esp + 0x64], esi
mov dword [esp + 0x68], esi
mov dword [esp + 0x6c], eax
call fcn.30037840
add esp, 8
test eax, eax
jne 0x30038243
pop edi
mov eax, 0xa
pop esi
add esp, 0x60
ret
push ebx
push ebp
push 0
lea edx, [esp + 0x5c]
push edx
lea eax, [esp + 0x3c]
push eax
lea ecx, [esp + 0x4c]
push ecx
lea edx, [esp + 0x5c]
push edx
lea eax, [esp + 0x3c]
push eax
call fcn.30037330
mov ebp, dword [esp + 0x94]
push edi
push ebp
call fcn.300377b0
add esp, 0x20
test eax, eax
jge 0x300382e6
mov ebx, dword [esp + 0x74]
test ebx, ebx
je 0x300382c0
push esi
push ebx
call fcn.300373c0
mov esi, eax
add esp, 8
test esi, esi
jne 0x3003883d
mov ecx, dword [ebx + 4]
mov edi, dword [ebx + 8]
shl ecx, 2
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
test esi, esi
rep stosb byte es:[edi], al
mov eax, dword [ebx + 8]
mov dword [eax], esi
mov dword [ebx], 1
jne 0x3003883d
mov eax, dword [esp + 0x78]
test eax, eax
je 0x300382dc
push ebp
push eax
call fcn.30037450
mov esi, eax
add esp, 8
test esi, esi
jne 0x3003883d
pop ebp
pop ebx
pop edi
xor eax, eax
pop esi
add esp, 0x60
ret
lea ecx, [esp + 0x28]
push ebp
push ecx
call fcn.30037450
mov esi, eax
add esp, 8
test esi, esi
jne 0x3003883d
lea edx, [esp + 0x4c]
push edi
push edx
call fcn.30037450
mov esi, eax
add esp, 8
test esi, esi
jne 0x3003883d
mov eax, dword [ebp + 4]
add eax, 2
push eax
lea ecx, [esp + 0x44]
mov ebx, 1
push ecx
mov dword [esp + 0x54], ebx
mov dword [esp + 0x30], ebx
call fcn.300373c0
mov esi, eax
add esp, 8
test esi, esi
jne 0x3003883d
lea edx, [esp + 0x40]
push ebx
push edx
call fcn.300373c0
mov esi, eax
add esp, 8
test esi, esi
jne 0x3003883d
test esi, esi
mov ecx, dword [esp + 0x44]
mov edi, dword [esp + 0x48]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x48]
mov dword [eax], esi
mov dword [esp + 0x40], ebx
jne 0x3003883d
lea ecx, [esp + 0x34]
push 2
push ecx
call fcn.300373c0
mov esi, eax
add esp, 8
test esi, esi
jne 0x3003883d
lea edx, [esp + 0x58]
push 3
push edx
call fcn.300373c0
mov esi, eax
add esp, 8
test esi, esi
jne 0x3003883d
lea eax, [esp + 0x4c]
push eax
call fcn.300375a0
add esp, 4
and eax, 0x8000001f
jns 0x300383c0
dec eax
or eax, 0xffffffe0
inc eax
cmp eax, 0x1f
jge 0x30038402
mov edi, 0x1f
sub edi, eax
lea ecx, [esp + 0x28]
push edi
push ecx
mov dword [esp + 0x2c], edi
call fcn.300375f0
mov esi, eax
add esp, 8
test esi, esi
jne 0x3003883d
lea edx, [esp + 0x4c]
push edi
push edx
call fcn.300375f0
mov esi, eax
add esp, 8
test esi, esi
jne 0x3003883d
jmp 0x3003840a
mov dword [esp + 0x24], 0
mov ebx, dword [esp + 0x2c]
mov eax, dword [esp + 0x50]
dec ebx
dec eax
mov ebp, ebx
sub ebp, eax
mov edi, ebp
mov dword [esp + 0x18], eax
shl edi, 5
lea eax, [esp + 0x4c]
push edi
push eax
call fcn.300375f0
lea ecx, [esp + 0x54]
push ecx
lea edx, [esp + 0x34]
push edx
call fcn.30037840
add esp, 0x10
test eax, eax
jl 0x30038471
mov eax, dword [esp + 0x48]
inc dword [eax + ebp*4]
lea eax, [esp + 0x4c]
push eax
lea ecx, [esp + 0x2c]
push ecx
mov edx, ecx
push edx
call fcn.30037b50
lea eax, [esp + 0x58]
push eax
lea ecx, [esp + 0x38]
push ecx
call fcn.30037840
add esp, 0x14
test eax, eax
jge 0x30038442
lea edx, [esp + 0x4c]
push edi
push edx
call fcn.300376f0
mov ecx, dword [esp + 0x20]
add esp, 8
cmp ebx, ecx
mov eax, ebx
mov dword [esp + 0x10], eax
jle 0x300387ae
lea ebx, [ebp*4]
add edi, 0xffffffe0
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], edi
jmp 0x300384b0
mov eax, dword [esp + 0x10]
lea esp, [esp]
mov ecx, dword [esp + 0x54]
mov edx, dword [esp + 0x18]
mov ebp, dword [esp + 0x30]
mov edi, dword [ecx + edx*4]
cmp dword [ebp + eax*4], edi
jb 0x300384d6
mov eax, dword [esp + 0x48]
mov dword [eax + ebx - 4], 0xffffffff
jmp 0x30038582
mov ecx, dword [ebp + eax*4]
mov eax, ecx
mov esi, edi
shr esi, 0x10
xor edx, edx
div esi
mov ebx, edi
and ebx, 0xffff
mov edx, eax
mov eax, dword [esp + 0x10]
mov ebp, dword [ebp + eax*4 - 4]
mov eax, edx
imul eax, esi
sub ecx, eax
mov eax, ebp
shr eax, 0x10
shl ecx, 0x10
or ecx, eax
mov eax, edx
imul eax, ebx
cmp ecx, eax
mov dword [esp + 0x14], edx
jae 0x3003852f
dec edx
add ecx, edi
cmp ecx, edi
mov dword [esp + 0x14], edx
jb 0x3003852f
cmp ecx, eax
jae 0x3003852b
add ecx, edi
dec edx
cmp ecx, edi
jae 0x30038520
mov dword [esp + 0x14], edx
sub ecx, eax
xor edx, edx
mov eax, ecx
div esi
and ebp, 0xffff
mov edx, eax
imul edx, esi
sub ecx, edx
mov edx, eax
imul edx, ebx
shl ecx, 0x10
or ecx, ebp
cmp ecx, edx
jae 0x3003856b
add ecx, edi
dec eax
cmp ecx, edi
jb 0x3003856b
lea esp, [esp]
cmp ecx, edx
jae 0x3003856b
add ecx, edi
dec eax
cmp ecx, edi
jae 0x30038560
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x1c]
shl ecx, 0x10
or ecx, eax
mov eax, dword [esp + 0x48]
mov dword [eax + edx - 4], ecx
mov ebx, edx
mov eax, dword [esp + 0x48]
inc dword [eax + ebx - 4]
lea ebx, [ebx]
mov eax, dword [esp + 0x48]
dec dword [ebx + eax - 4]
mov ebp, 1
lea eax, [esp + 0x34]
push ebp
push eax
call fcn.300373c0
mov esi, eax
add esp, 8
test esi, esi
jne 0x3003883d
test esi, esi
mov ecx, dword [esp + 0x38]
mov edi, dword [esp + 0x3c]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x3c]
mov dword [ecx], eax
mov dword [esp + 0x34], ebp
jne 0x3003883d
mov ecx, dword [esp + 0x18]
cmp ecx, ebp
jl 0x300385e1
mov edx, dword [esp + 0x54]
mov eax, dword [edx + ecx*4 - 4]
mov edx, dword [esp + 0x3c]
mov dword [edx], eax
mov eax, dword [esp + 0x54]
mov ecx, dword [eax + ecx*4]
mov edx, dword [esp + 0x3c]
mov dword [edx + 4], ecx
mov eax, dword [esp + 0x48]
mov ecx, dword [ebx + eax - 4]
push ecx
lea edx, [esp + 0x38]
push edx
mov eax, edx
push eax
call fcn.300381c0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x3003883d
lea ecx, [esp + 0x58]
push ebp
push ecx
call fcn.300373c0
mov esi, eax
add esp, 8
test esi, esi
jne 0x3003883d
test esi, esi
mov ecx, dword [esp + 0x5c]
mov edi, dword [esp + 0x60]
rep stosd dword es:[edi], eax
mov edx, dword [esp + 0x60]
mov dword [edx], eax
mov dword [esp + 0x58], ebp
jne 0x3003883d
mov eax, dword [esp + 0x10]
cmp eax, 2
jge 0x30038659
xor ecx, ecx
jmp 0x30038661
mov ecx, dword [esp + 0x30]
mov ecx, dword [ecx + eax*4 - 8]
cmp eax, ebp
mov edx, dword [esp + 0x60]
mov dword [edx], ecx
jge 0x3003866f
xor ecx, ecx
jmp 0x30038677
mov ecx, dword [esp + 0x30]
mov ecx, dword [ecx + eax*4 - 4]
mov edx, dword [esp + 0x60]
mov dword [edx + 4], ecx
mov ecx, dword [esp + 0x30]
mov edx, dword [ecx + eax*4]
mov eax, dword [esp + 0x60]
lea ecx, [esp + 0x58]
mov dword [eax + 8], edx
push ecx
lea edx, [esp + 0x38]
push edx
call fcn.30037840
add esp, 8
test eax, eax
jg 0x30038590
mov eax, dword [esp + 0x48]
mov ecx, dword [eax + ebx - 4]
push ecx
lea edx, [esp + 0x50]
push edx
lea eax, [esp + 0x3c]
push eax
call fcn.300381c0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x3003883d
mov edi, dword [esp + 0x20]
lea ecx, [esp + 0x34]
push edi
push ecx
call fcn.300375f0
mov esi, eax
add esp, 8
test esi, esi
jne 0x3003883d
lea edx, [esp + 0x34]
push edx
lea eax, [esp + 0x2c]
push eax
mov ecx, eax
push ecx
call fcn.30037b50
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x3003883d
mov dword [esp + 0x20], eax
lea eax, [esp + 0x64]
push eax
lea ecx, [esp + 0x2c]
lea edx, [esp + 0x24]
push ecx
mov dword [esp + 0x6c], ebp
mov dword [esp + 0x70], ebp
mov dword [esp + 0x74], edx
call fcn.30037840
add esp, 8
test eax, eax
jge 0x3003878b
lea edx, [esp + 0x4c]
push edx
lea eax, [esp + 0x38]
push eax
call fcn.30037450
mov esi, eax
add esp, 8
test esi, esi
jne 0x3003883d
lea ecx, [esp + 0x34]
push edi
push ecx
call fcn.300375f0
mov esi, eax
add esp, 8
test esi, esi
jne 0x3003883d
lea edx, [esp + 0x34]
push edx
lea eax, [esp + 0x2c]
push eax
mov ecx, eax
push ecx
call fcn.30037ae0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x3003883d
mov eax, dword [esp + 0x48]
dec dword [eax + ebx - 4]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
dec eax
sub edi, 0x20
sub ebx, 4
cmp eax, ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0x20], edi
mov dword [esp + 0x1c], ebx
jg 0x300384a5
mov edi, dword [esp + 0x74]
test edi, edi
je 0x300387d9
lea edx, [esp + 0x40]
push edx
push edi
call fcn.30037450
mov eax, dword [esp + 0x84]
mov ecx, dword [eax]
mov edx, dword [esp + 0x88]
add esp, 8
imul ecx, dword [edx]
mov dword [edi], ecx
mov edi, dword [esp + 0x78]
test edi, edi
je 0x3003883d
mov eax, dword [esp + 0x24]
push eax
lea ecx, [esp + 0x2c]
push ecx
call fcn.300376f0
lea edx, [esp + 0x30]
push edx
push edi
call fcn.30037450
mov eax, dword [esp + 0x8c]
mov ecx, dword [eax]
lea eax, [esp + 0x74]
push eax
mov ebx, 1
lea edx, [esp + 0x38]
push edi
mov dword [edi], ecx
mov dword [esp + 0x3c], 0
mov dword [esp + 0x7c], ebx
mov dword [esp + 0x80], ebx
mov dword [esp + 0x84], edx
call fcn.30037840
add esp, 0x18
test eax, eax
jne 0x3003883d
mov dword [edi], ebx
push 0
lea ecx, [esp + 0x5c]
push ecx
lea edx, [esp + 0x3c]
push edx
lea eax, [esp + 0x4c]
push eax
lea ecx, [esp + 0x5c]
push ecx
lea edx, [esp + 0x3c]
push edx
call fcn.30037360
add esp, 0x18
pop ebp
pop ebx
pop edi
mov eax, esi
pop esi
add esp, 0x60
ret