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

Disassembly:
sub esp, 0x70
push ebx
mov ebx, dword [esp + 0x78]
mov ecx, dword [ebx]
mov edx, dword [ebx + 4]
push ebp
push esi
mov dword [esp + 0x30], 0xffffffff
push edi
mov edi, dword [ebx + 0xc]
movzx eax, byte [edi + 0x10]
mov dword [esp + 0x2c], ecx
mov ecx, dword [ecx + 4]
lea eax, [eax + eax*8]
mov ebp, dword [ecx + eax*8 + 0x18]
lea esi, [ecx + eax*8 + 8]
mov eax, dword [esi + 0x44]
mov dword [esp + 0x14], 0
mov dword [esp + 0x24], 1
mov dword [esp + 0x18], esi
mov dword [esp + 0x30], ebp
mov dword [esp + 0x20], edx
test eax, eax
je 0x1015819c
mov esi, eax
mov dword [esp + 0x10], esi
jmp 0x101581ff
push 0x38
lea eax, [esp + 0x4c]
push 0
push eax
call fcn.101845c0
mov ecx, 1
lea edx, [esp + 0x40]
lea eax, [esp + 0x44]
mov word [esp + 0x82], cx
mov dword [esp + 0x58], edx
mov dword [esp + 0x5c], eax
mov byte [esp + 0x84], 5
mov dword [esp + 0x60], ebp
mov ecx, dword [ebp + 0x1c]
add esp, 0xc
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], 1
test byte [esi + 0x24], 1
jne 0x101581f5
mov edx, dword [esi + 0x10]
mov eax, dword [edx + 8]
mov dword [esp + 0x5c], eax
lea ecx, [esp + 0x48]
mov dword [esp + 0x10], ecx
mov esi, ecx
mov edx, dword [ebp + 0x1c]
push 0
push edx
call fcn.100ff170
movzx ebp, ax
movsx eax, bp
cdq
push edx
push eax
call fcn.100ff170
movzx eax, ax
add esp, 0x10
cmp ax, 0x21
jle 0x10158230
add eax, 0xffffffdf
movzx eax, ax
mov dword [esp + 0x1c], eax
jmp 0x10158238
mov dword [esp + 0x1c], 0
cmp dword [ebx + 0x10], 0
jne 0x10158345
mov ecx, dword [esp + 0x2c]
mov edx, dword [ecx]
mov eax, dword [edx]
test dword [eax + 0x18], 0x100000
je 0x10158345
mov eax, dword [esp + 0x18]
cmp dword [eax + 0x44], 0
jne 0x10158345
test byte [eax + 0x24], 7
jne 0x10158345
mov eax, dword [esp + 0x20]
mov esi, dword [eax + 0x14]
mov eax, dword [eax + 0xc]
lea edx, [eax + eax*2]
shl edx, 4
add edx, esi
mov dword [esp + 0x28], edx
cmp esi, edx
jae 0x10158336
mov eax, dword [edi + 8]
mov ecx, dword [edi + 0xc]
and eax, dword [esi + 0x20]
and ecx, dword [esi + 0x24]
or eax, ecx
jne 0x1015831c
push eax
push eax
mov eax, dword [esp + 0x20]
mov ecx, esi
call fcn.10154e20
add esp, 8
test eax, eax
je 0x10158318
mov edx, dword [edi + 0x2c]
mov ecx, 1
mov word [edi + 0x28], cx
mov ecx, dword [esp + 0x1c]
mov dword [edi + 0x18], 1
mov dword [edi + 0x1c], 0
mov dword [edx], esi
lea eax, [ecx + ebp + 0x1c]
mov edx, 0x2b
mov word [edi + 0x12], ax
mov eax, edx
mov word [edi + 0x16], dx
call fcn.100ff120
mov word [edi + 0x14], ax
mov dword [edi + 0x24], 0x4000
mov eax, dword [esi + 0x20]
mov ecx, dword [esi + 0x24]
or eax, dword [esp + 0x88]
or ecx, dword [esp + 0x8c]
mov dword [edi], eax
mov eax, ebx
mov dword [edi + 4], ecx
call fcn.10157950
mov dword [esp + 0x14], eax
mov edx, dword [esp + 0x28]
add esi, 0x30
cmp dword [esp + 0x14], 0
je 0x10158285
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x70
ret
cmp dword [esp + 0x14], 0
jne 0x10158535
mov esi, dword [esp + 0x10]
test esi, esi
je 0x10158535
mov eax, dword [esi + 0x24]
test eax, eax
je 0x10158379
movzx edx, byte [edi + 0x10]
mov ebx, dword [esp + 0x20]
push eax
push edx
call fcn.10158100
mov ebx, dword [esp + 0x8c]
mov esi, dword [esp + 0x18]
add esp, 8
test eax, eax
je 0x1015851e
mov edx, dword [esp + 0x88]
xor eax, eax
xor ecx, ecx
mov word [edi + 0x28], ax
mov byte [edi + 0x11], al
mov eax, dword [esp + 0x8c]
mov word [edi + 0x12], cx
mov ecx, dword [esp + 0x18]
mov dword [edi + 0x18], 0
mov dword [edi], edx
mov dword [edi + 4], eax
mov word [edi + 0x16], bp
mov dword [edi + 0x1c], esi
mov edx, dword [ecx + 0x2c]
push edx
push esi
push ebx
call fcn.10158010
add esp, 0xc
cmp dword [esi + 0x28], 0
mov dword [esp + 0x28], eax
jg 0x10158410
neg eax
sbb al, al
and al, byte [esp + 0x24]
mov ecx, ebp
mov byte [edi + 0x11], al
mov eax, dword [esp + 0x1c]
mov dword [edi + 0x24], 0x100
call fcn.100ff120
add ax, 0x10
mov word [edi + 0x14], ax
mov eax, dword [esp + 0x20]
push edi
push eax
call fcn.10157b00
add esp, 8
mov eax, ebx
call fcn.10157950
mov word [edi + 0x16], bp
test eax, eax
jne 0x10158539
jmp 0x101584fd
mov eax, esi
call fcn.101580c0
mov ecx, dword [esp + 0x18]
not eax
and eax, dword [ecx + 0x38]
not edx
and edx, dword [ecx + 0x3c]
mov ecx, eax
or ecx, edx
mov dword [esp + 0x44], edx
mov ecx, 0x240
je 0x10158439
mov ecx, 0x200
cmp dword [esp + 0x28], 0
mov dword [edi + 0x24], ecx
jne 0x1015848a
mov ecx, eax
or ecx, edx
jne 0x101584fd
test byte [esi + 0x34], 4
jne 0x101584fd
mov dx, word [esi + 0x2c]
mov ecx, dword [esp + 0x30]
cmp dx, word [ecx + 0x2a]
jge 0x101584fd
mov ecx, dword [esp + 0x2c]
test byte [ecx + 0x22], 4
jne 0x101584fd
cmp dword [0x10208e18], 0
je 0x101584fd
mov edx, dword [ecx]
mov ecx, dword [edx]
test byte [ecx + 0x3c], 0x40
jne 0x101584fd
mov edx, dword [esp + 0x28]
neg edx
sbb dl, dl
and dl, byte [esp + 0x24]
or eax, dword [esp + 0x44]
mov byte [edi + 0x11], dl
jne 0x101584d2
mov eax, dword [esp + 0x1c]
mov ecx, ebp
call fcn.100ff120
mov si, ax
mov eax, dword [esp + 0x10]
movsx ecx, word [eax + 0x2c]
mov eax, ecx
shl eax, 4
sub eax, ecx
mov ecx, dword [esp + 0x30]
movsx ecx, word [ecx + 0x2a]
cdq
idiv ecx
add si, ax
inc si
mov word [edi + 0x14], si
jmp 0x101584dc
mov edx, dword [esp + 0x1c]
add edx, ebp
mov word [edi + 0x14], dx
mov eax, dword [esp + 0x20]
push edi
push eax
call fcn.10157b00
add esp, 8
mov eax, ebx
call fcn.10157950
mov word [edi + 0x16], bp
test eax, eax
jne 0x10158539
mov esi, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
push 0
push esi
push ecx
push ebx
call fcn.10157bd0
mov edx, dword [esp + 0x28]
add esp, 0x10
cmp dword [edx + 0x44], 0
mov dword [esp + 0x14], eax
jne 0x10158539
jmp 0x10158522
mov eax, dword [esp + 0x14]
mov ecx, dword [esi + 0x14]
inc dword [esp + 0x24]
mov dword [esp + 0x10], ecx
test eax, eax
je 0x10158341
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x70
ret