Function at 0x100164a8
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
mov dword [ebp - 8], edi
mov dword [ebp - 4], esi
mov dword [ebp - 0xc], ebx
mov ebx, dword [ebp + 0xc]
lea eax, [ebp - 0x10]
push 0x10
push dword [ebp + 8]
push eax
push ebx
call fcn.10026824
add esp, 0x10
test eax, eax
je 0x100164f4
movzx edx, byte [ebp + 0x10]
test dl, 1
je 0x100164e3
mov ebx, dword [ebp - 0xc]
movzx eax, ax
mov esp, ebp
pop ebp
ret
push 0x100b600c
push ebx
push 2
push eax
call fcn.100149ac
add esp, 0x10
mov edx, dword [ebp - 0x10]
movzx eax, byte [edx + 0x129]
test al, 0x20
jne 0x100165ad
mov ecx, dword [edx + 0x18]
test ecx, ecx
je 0x10016a36
movzx eax, byte [ecx + 0x3c]
test al, 2
je 0x1001654b
mov eax, 0x25e
mov dword [ecx + 0x30], eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0x18]
mov dword [edx + 0x34], eax
mov ebx, dword [ebp - 0x10]
mov eax, dword [ebx + 0x64]
test eax, eax
je 0x1001653f
xor edx, edx
mov dword [eax + 4], edx
mov eax, dword [ebp - 0x10]
mov dword [eax + 0x64], edx
mov ebx, dword [ebp - 0xc]
mov eax, 0x25e
mov esp, ebp
pop ebp
ret
movzx ebx, byte [edx + 0x12b]
movzx esi, byte [edx + 0x12c]
mov ecx, ebx
and ecx, 0x40
mov edi, 2
xor eax, eax
test ecx, ecx
setne al
test ebx, 0x80
jne 0x10016577
mov edi, 0
test esi, 1
mov ecx, 4
jne 0x10016589
mov ecx, 0
or eax, edi
or eax, ecx
mov ecx, 0x25e
push ecx
push ecx
push eax
push 0xffffffffffffffff
push edx
call fcn.10077ea0
add esp, 0x14
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov esp, ebp
pop ebp
ret
mov eax, dword [edx + 0x100]
cmp eax, 1
jne 0x10016663
mov ecx, dword [edx + 0x18]
test ecx, ecx
je 0x10016a4f
movzx eax, byte [ecx + 0x3c]
test al, 2
je 0x10016601
mov eax, 0x24b
mov dword [ecx + 0x30], eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0x18]
mov dword [edx + 0x34], eax
mov ebx, dword [ebp - 0x10]
mov eax, dword [ebx + 0x64]
test eax, eax
je 0x100165f5
xor edx, edx
mov dword [eax + 4], edx
mov eax, dword [ebp - 0x10]
mov dword [eax + 0x64], edx
mov ebx, dword [ebp - 0xc]
mov eax, 0x24b
mov esp, ebp
pop ebp
ret
movzx ebx, byte [edx + 0x12b]
movzx esi, byte [edx + 0x12c]
mov ecx, ebx
and ecx, 0x40
mov edi, 2
xor eax, eax
test ecx, ecx
setne al
test ebx, 0x80
jne 0x1001662d
mov edi, 0
test esi, 1
mov ecx, 4
jne 0x1001663f
mov ecx, 0
or eax, edi
or eax, ecx
mov ecx, 0x24b
push ecx
push ecx
push eax
push 0xffffffffffffffff
push edx
call fcn.10077ea0
add esp, 0x14
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov esp, ebp
pop ebp
ret
movzx ecx, byte [edx + 0x12c]
test cl, 8
je 0x1001668d
movzx eax, byte [edx + 0x128]
test al, 0x10
mov esi, 1
jne 0x10016976
mov esi, 0xffffffff
jmp 0x10016976
movsx eax, byte [edx + 0x11c]
cmp eax, 5
je 0x10016aa8
mov eax, dword [edx + 0x88]
mov dword [ebp - 0x5c], eax
push 1
mov ecx, dword [edx + 0xb4]
lea edx, [ebp - 0x24]
xor eax, eax
mov dword [ebp - 0x28], eax
push edx
mov dword [ebp - 0x24], eax
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x28], eax
cmp eax, 0xffffffff
jne 0x100166e0
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x100166e0
mov eax, 0xffffffff
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x14], eax
mov eax, dword [ecx + 0xb4]
mov dword [ebp - 0x18], edx
lea edi, [ebp - 0x1c]
push 2
xor esi, esi
mov dword [ebp - 0x20], esi
push edi
mov dword [ebp - 0x1c], esi
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x20], eax
cmp eax, 0xffffffff
jne 0x10016729
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x10016729
mov eax, 0xffffffff
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov esi, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x10]
mov edx, dword [eax + 0x100]
cmp edx, 7
jne 0x10016743
add esi, 0xffffffff
adc ecx, 0xffffffff
mov edi, dword [ebp - 0x14]
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x5c]
cdq
sub edi, eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x60], edi
sbb eax, edx
mov dword [ebp - 0x5c], eax
sub edi, esi
sbb eax, ecx
mov eax, dword [ebp - 0x58]
jl 0x10016782
movzx edx, byte [eax + 0x128]
test dl, 0x10
mov esi, 1
jne 0x10016939
mov esi, 0xffffffff
jmp 0x10016939
movzx edx, byte [eax + 0x128]
test dl, 1
jne 0x10016795
xor esi, esi
jmp 0x10016939
mov edx, 0x100bb41c
mov edi, dword [edx]
mov dword [ebp - 0x48], edi
mov eax, dword [edx + 4]
mov dword [ebp - 0x44], eax
movzx eax, byte [edx + 8]
mov byte [ebp - 0x40], al
mov byte [ebp - 0x3c], 1
xor eax, eax
mov edx, 0x1a
mov byte [ebp - 0x3b], al
mov byte [ebp - 0x3a], dl
mov byte [ebp - 0x39], al
mov eax, 0xa
mov byte [ebp - 0x30], al
mov eax, 0x1a
mov byte [ebp - 0x2f], al
mov eax, 0xd
mov byte [ebp - 0x2e], al
mov eax, 0x1a
mov byte [ebp - 0x2c], al
mov eax, 0xd
mov byte [ebp - 0x2b], al
mov eax, 0xa
mov byte [ebp - 0x2a], al
mov eax, dword [ebp - 0x10]
movzx edi, byte [eax + 0x12a]
test edi, 0x80
mov dword [ebp - 0x38], edi
je 0x10016825
movsx edx, byte [eax + 0x11c]
cmp edx, 4
je 0x10016a7b
movsx edx, byte [eax + 0x11c]
cmp edx, 3
je 0x10016a68
mov edx, edi
test dl, 0x40
je 0x1001678e
movsx edx, byte [eax + 0x11c]
cmp edx, 5
je 0x1001684d
cmp edx, 7
je 0x1001684d
cmp edx, 6
je 0x1001684d
xor esi, esi
jmp 0x10016939
movsx edi, byte [eax + 0x11e]
mov edx, 3
mov dword [ebp - 0x38], edx
cmp edi, 1
je 0x10016869
lea edx, [ebp - 0x2c]
mov dword [ebp - 0x34], edx
jmp 0x1001686f
lea edx, [ebp - 0x30]
mov dword [ebp - 0x34], edx
test edx, edx
je 0x1001678e
mov edx, dword [ebp - 0x60]
mov edi, dword [ebp - 0x5c]
sub esi, edx
sbb ecx, edi
mov edx, dword [ebp - 0x38]
sub esi, edx
sbb ecx, 0
jge 0x10016892
xor esi, esi
jmp 0x10016939
mov ecx, dword [ebp - 0x60]
lea edx, [ebp - 0x50]
push 0
mov esi, dword [eax + 0xb4]
mov eax, edi
mov dword [ebp - 0x54], ecx
push edx
mov dword [ebp - 0x50], eax
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x54], eax
cmp eax, 0xffffffff
jne 0x100168ce
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x100168ce
mov eax, 0xffffffff
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x50], eax
mov esi, dword [ebp - 0x10]
mov edx, dword [ebp - 0x38]
lea ecx, [ebp - 0x60]
lea eax, [ebp - 0x4c]
push 0
push eax
push edx
push ecx
push dword [esi + 0xb4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x100168f6
mov dword [ebp - 0x4c], 0
mov eax, dword [ebp - 0x38]
cmp eax, dword [ebp - 0x4c]
jne 0x10016934
mov edx, dword [ebp - 0x34]
lea ecx, [ebp - 0x60]
push eax
push edx
push ecx
call fcn.1007f564
add esp, 0xc
test eax, eax
jne 0x10016934
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x1001692d
movzx edx, byte [eax + 0x128]
test dl, 0x10
je 0x1001692d
mov esi, 1
jmp 0x10016939
mov esi, 0xffffffff
jmp 0x10016939
mov eax, dword [ebp - 0x10]
xor esi, esi
mov ecx, dword [ebp - 0x14]
lea edx, [ebp - 0x34]
push 0
mov edi, dword [eax + 0xb4]
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x38], ecx
push edx
mov dword [ebp - 0x34], eax
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x38], eax
cmp eax, 0xffffffff
jne 0x10016976
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x10016976
mov eax, 0xffffffff
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
push ebx
call fcn.100260c0
pop ecx
test eax, eax
je 0x10016a27
mov edx, dword [ebp - 0x10]
mov ebx, dword [edx + 0x18]
test ebx, ebx
je 0x10016a8e
movzx ecx, byte [ebx + 0x3c]
test cl, 2
je 0x100169ca
mov dword [ebx + 0x30], eax
mov edx, dword [ebp - 0x10]
mov ecx, dword [edx + 0x18]
mov dword [ecx + 0x34], eax
mov ebx, dword [ebp - 0x10]
mov edx, dword [ebx + 0x64]
test edx, edx
je 0x100169bd
xor ecx, ecx
mov dword [edx + 4], ecx
mov edx, dword [ebp - 0x10]
mov dword [edx + 0x64], ecx
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov esp, ebp
pop ebp
ret
push eax
push eax
movzx esi, byte [edx + 0x12b]
movzx edi, byte [edx + 0x12c]
mov ebx, esi
and ebx, 0x40
xor ecx, ecx
test ebx, ebx
setne cl
test esi, 0x80
mov ebx, 2
jne 0x100169f8
mov ebx, 0
test edi, 1
mov esi, 4
jne 0x10016a0a
mov esi, 0
or ecx, ebx
or ecx, esi
push ecx
push 0xffffffffffffffff
push edx
call fcn.10077ea0
add esp, 0x14
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp - 0xc]
mov edi, dword [ebp - 8]
mov eax, esi
mov esi, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
push edx
mov eax, 0x25e
push eax
push eax
push 1
call fcn.10014254
add esp, 0x10
mov ebx, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
push edx
mov eax, 0x24b
push eax
push eax
push 1
call fcn.10014254
add esp, 0x10
mov ebx, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
lea edx, [ebp - 0x3c]
mov dword [ebp - 0x34], edx
mov edi, 4
mov dword [ebp - 0x38], edi
jmp 0x1001686f
lea edx, [ebp - 0x48]
mov dword [ebp - 0x34], edx
mov edi, 9
mov dword [ebp - 0x38], edi
jmp 0x1001686f
push edx
push eax
push eax
push 0
call fcn.10014254
add esp, 0x10
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov esp, ebp
pop ebp
ret
test ecx, 0x80
je 0x10016abe
mov eax, dword [edx + 0x44]
sub eax, dword [edx + 0x3c]
mov dword [ebp - 0x5c], eax
jmp 0x100166a6
xor eax, eax
mov dword [ebp - 0x5c], eax
jmp 0x100166a6