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

Disassembly:
sub esp, 0x2c
mov edx, dword [esp + 0x38]
xor ecx, ecx
push ebx
push ebp
push esi
cmp dword [edx + 0x24], 1
mov ebp, 1
mov esi, dword [esp + 0x40]
sete cl
mov dword [esp + 0x1c], ecx
xor ecx, ecx
cmp dword [edx + 0x24], 3
mov eax, dword [esi + 0x1c]
mov ebx, dword [esi + 4]
setne cl
mov dword [esp + 0x18], eax
add eax, ecx
sar eax, cl
mov dword [esp + 0x34], ecx
xor ecx, ecx
mov dword [esp + 0x30], eax
mov eax, dword [esi]
mov esi, dword [edx + 0x14]
push edi
lea edi, [edx + 0x14]
mov dword [esp + 0x14], ebx
cmp dword [eax + 0x18], ecx
mov dword [esp + 0x18], edi
sete cl
sar esi, 1
imul esi, dword [esp + 0x54]
mov dword [esp + 0x30], ecx
mov ecx, dword [esp + 0x44]
shl esi, 6
mov ecx, dword [ecx + 0x28]
add esi, dword [edx + 8]
shl ebp, cl
mov ecx, dword [esp + 0x44]
dec ebp
add ecx, 0x20
mov dword [esp + 0x24], ebp
mov dword [esp + 0x10], ecx
mov ebp, 0x20
mov ecx, dword [esp + 0x54]
mov eax, dword [esp + 0x10]
shl ecx, 5
cmp dword [ebx + 4], 0
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], ecx
je 0x10078227
mov eax, dword [eax]
push dword [esp + 0x24]
mov edx, dword [esp + 0x58]
sub eax, ecx
cmp eax, ebp
mov ecx, ebp
push edx
cmovl ecx, eax
mov eax, dword [esp + 0x4c]
push ecx
push dword [esp + 0x5c]
mov ecx, dword [esp + 0x54]
push dword [esp + 0x5c]
mov eax, dword [eax + 0x14]
push dword [esp + 0x30]
push ebx
push eax
sar eax, 1
imul eax, edx
push esi
shl eax, 6
add eax, dword [ecx + 8]
push eax
mov eax, dword [esp + 0x68]
mov eax, dword [eax + 0x10]
call eax
mov eax, dword [esp + 0x6c]
add esp, 0x28
mov ecx, dword [esp + 0x48]
add eax, 0x1c
add ecx, 0x14
jmp 0x10078238
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x44]
mov dword [esp + 0x2c], ecx
add eax, 0x1c
mov ecx, edi
mov esi, dword [esp + 0x44]
add esi, 0x1c
cmp dword [ebx + 0x28], 0
mov dword [esp + 0x1c], esi
mov esi, dword [esp + 0x28]
jne 0x1007826f
cmp dword [ebx + 0x2c], 0
mov edi, ecx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], edi
jne 0x1007826f
cmp dword [ebx + 0x24], 0
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], edi
je 0x10078445
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x38]
mov dword [esp + 0x10], edi
mov eax, dword [eax]
sub eax, dword [esp + 0x2c]
cmp eax, 0x20
cmovl ebp, eax
add ebp, dword [esp + 0x20]
sar ebp, cl
mov ecx, dword [esp + 0x44]
mov dword [esp + 0x2c], ebp
test dword [ecx + 0x1c], edx
mov edx, dword [esp + 0x48]
je 0x100782ef
mov dword [esp + 0x10], edi
test ebp, ebp
jle 0x100782ef
mov edx, dword [esp + 0x18]
mov edi, ebp
mov ebx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x20]
nop dword [eax + eax]
mov eax, dword [ebx]
lea ecx, [esi + eax*2]
mov ax, word [ecx - 2]
mov word [ecx], ax
mov ecx, ebp
mov eax, dword [edx]
sar eax, 1
shl eax, cl
lea esi, [esi + eax*2]
sub edi, 1
jne 0x100782c0
mov edx, dword [esp + 0x48]
mov ebp, dword [esp + 0x2c]
mov ebx, dword [esp + 0x14]
lea eax, [edx + 0x14]
mov dword [esp + 0x10], eax
mov esi, dword [esp + 0x44]
mov ecx, dword [esp + 0x20]
mov edi, dword [esp + 0x50]
add edi, 0x2f68
mov eax, dword [esi + 0x18]
add esi, 0xc
sar eax, 1
imul eax, dword [esp + 0x54]
shl eax, 5
sar eax, cl
mov ecx, edx
sub ecx, dword [esp + 0x44]
cmp dword [ebx + 0x24], 0
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], ecx
je 0x100783a5
xor ebx, ebx
nop dword [eax]
push dword [esp + 0x24]
mov eax, dword [esp + 0x14]
push dword [esp + 0x34]
mov ecx, dword [edx + 0x24]
push ebx
push dword [eax]
mov eax, dword [esp + 0x2c]
push dword [esp + 0x38]
push dword [esp + 0x68]
mov eax, dword [esi + eax]
push ebp
mov ebp, dword [esp + 0x3c]
push edi
push dword [esp + 0x6c]
push dword [esp + 0x58]
lea eax, [eax + ebp*2]
push dword [esp + 0x3c]
push dword [edx + 0x18]
lea edx, [ebp*2]
push eax
mov eax, dword [esi]
add eax, edx
push eax
mov eax, dword [esp + 0x78]
mov eax, dword [eax + ecx*4 + 0x10]
call eax
mov edx, dword [esp + 0x80]
lea esi, [esi + 4]
mov ebp, dword [esp + 0x64]
inc ebx
add esp, 0x38
add edi, 0x2f68
cmp ebx, 2
jl 0x10078330
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret
mov eax, dword [esp + 0x4c]
xor ebx, ebx
mov ebp, dword [esp + 0x14]
add eax, 0x1000
mov dword [esp + 0x44], eax
add ebp, 0x28
nop dword [eax + eax]
cmp dword [ebp], 0
je 0x10078426
push dword [esp + 0x24]
mov eax, dword [esp + 0x14]
push dword [esp + 0x34]
mov ecx, dword [esp + 0x28]
push ebx
push dword [eax]
mov eax, dword [esp + 0x54]
add ecx, ecx
push dword [esp + 0x38]
mov edx, dword [edx + 0x24]
push dword [esp + 0x68]
push dword [esp + 0x44]
push edi
push eax
push dword [esp + 0x58]
mov eax, dword [esp + 0x70]
push dword [esp + 0x3c]
push dword [eax + 0x18]
mov eax, dword [esp + 0x4c]
mov eax, dword [esi + eax]
add eax, ecx
push eax
mov eax, dword [esi]
add eax, ecx
push eax
mov eax, dword [esp + 0x78]
mov eax, dword [eax + edx*4 + 0x10]
call eax
mov edx, dword [esp + 0x80]
add esp, 0x38
mov eax, dword [esp + 0x44]
inc ebx
add eax, 0x1000
add ebp, 4
mov dword [esp + 0x44], eax
add esi, 4
add edi, 0x2f68
cmp ebx, 2
jl 0x100783c0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret