Function at 0x10017630
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x18c
mov eax, dword [0x10063040]
xor eax, esp
mov dword [esp + 0x188], eax
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, ecx
mov ecx, 0x1006ba42
mov dword [esp + 0x2c], edi
call fcn.10038b15
mov ecx, dword [ebp + 8]
cmp ecx, 0xffffffff
jl 0x10017bdd
mov eax, dword [edi]
mov dword [esp + 0xc], eax
cmp ecx, dword [eax + 4]
jge 0x10017bdd
cmp dword [edi + 4], 0xffffffff
je 0x100176cf
test eax, eax
je 0x100176cf
mov esi, dword [eax + 0x7c]
test esi, esi
je 0x100176cf
mov eax, dword [esi]
test eax, eax
je 0x1001769c
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
cmp dword [esi + 0x40], 0
mov dword [esi], 0
je 0x100176b0
lea ecx, [esi + 4]
call fcn.10015380
push esi
mov dword [esi + 0x40], 0
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, dword [esp + 0x10]
add esp, 4
mov ecx, dword [ebp + 8]
mov dword [eax + 0x7c], 0
mov dword [edi + 4], 0xffffffff
cmp ecx, dword [edi + 0x134]
jne 0x10017708
cmp ecx, 0xffffffff
je 0x1001770d
lea esi, [edi + 8]
mov ecx, 0x4b
mov edi, ebx
xor eax, eax
rep movsd dword es:[edi], dword [esi]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x188]
xor ecx, esp
call fcn.1003738f
mov esp, ebp
pop ebp
ret 8
cmp ecx, 0xffffffff
jne 0x1001778b
mov eax, dword [edi]
mov eax, dword [eax + 4]
mov dword [ebx], eax
xor eax, eax
mov byte [ebx + 4], 0
mov dword [ebx + 0x108], 0
mov dword [ebx + 0x10c], 0
mov dword [ebx + 0x110], 0
mov dword [ebx + 0x114], 0
mov dword [ebx + 0x118], 0
mov dword [ebx + 0x11c], 0
mov dword [ebx + 0x120], 0
mov dword [ebx + 0x124], 0
mov dword [ebx + 0x128], 0
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x188]
xor ecx, esp
call fcn.1003738f
mov esp, ebp
pop ebp
ret 8
mov esi, dword [edi]
cmp ecx, dword [esi + 0x10]
jge 0x100177c8
test esi, esi
je 0x100177c8
mov eax, dword [esi + 0x24]
lea edx, [esi + 0x28]
sub esp, 0x10
mov dword [esi + 0x14], eax
lea eax, [esi + 0x78]
mov dword [esi + 0x10], 0
mov ecx, esi
push 0
push 0
push eax
call fcn.100165e0
xor ecx, ecx
add esp, 0x1c
test eax, eax
sete cl
mov dword [esi + 0x18], ecx
mov ecx, dword [ebp + 8]
mov esi, dword [edi]
cmp dword [esi + 0x10], ecx
jge 0x10017823
nop
test esi, esi
je 0x1001781c
cmp dword [esi + 0x18], 0
je 0x1001781c
mov edx, dword [esi + 0x10]
inc edx
cmp edx, dword [esi + 4]
je 0x1001781c
mov ecx, dword [esi + 0x50]
sub esp, 0x10
mov eax, dword [esi + 0x48]
add ecx, 0x2e
add ecx, dword [esi + 0x4c]
add eax, ecx
mov dword [esi + 0x10], edx
add dword [esi + 0x14], eax
lea edx, [esi + 0x28]
push 0
lea eax, [esi + 0x78]
mov ecx, esi
push 0
push eax
call fcn.100165e0
xor ecx, ecx
add esp, 0x1c
test eax, eax
sete cl
mov dword [esi + 0x18], ecx
mov ecx, dword [ebp + 8]
mov esi, dword [edi]
cmp dword [esi + 0x10], ecx
jl 0x100177d0
sub esp, 0x10
lea eax, [esp + 0x98]
lea edx, [esp + 0x48]
mov ecx, esi
push 0x104
push eax
push 0
call fcn.100165e0
mov ecx, dword [edi]
lea eax, [esp + 0x34]
add esp, 0x1c
lea edx, [esp + 0x20]
push eax
lea eax, [esp + 0x10]
push eax
call fcn.10016e20
add esp, 8
test eax, eax
je 0x1001787b
mov eax, 0x700
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x188]
xor ecx, esp
call fcn.1003738f
mov esp, ebp
pop ebp
ret 8
mov eax, dword [edi]
mov ecx, dword [eax]
cmp byte [ecx], 0
je 0x100178a5
cmp byte [ecx + 1], 0
je 0x10017937
mov eax, dword [ecx + 0xc]
add eax, dword [esp + 0xc]
push 0
push 0
push eax
push dword [ecx + 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x100178ac
mov eax, dword [esp + 0xc]
mov dword [ecx + 0x18], eax
push dword [esp + 0x18]
call fcn.10037897
mov ecx, dword [edi]
add esp, 4
mov dword [esp + 0x10], eax
mov esi, dword [ecx]
cmp byte [esi], 0
je 0x100178e8
push 0
lea ecx, [esp + 0x10]
push ecx
push dword [esp + 0x20]
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x100178e2
mov byte [esi + 8], 1
mov eax, dword [esp + 0xc]
jmp 0x10017925
mov edx, dword [esi + 0x18]
mov ecx, dword [esi + 0x14]
mov eax, dword [esp + 0x18]
add eax, edx
mov dword [esp + 0xc], ecx
sub dword [esp + 0xc], edx
cmp eax, ecx
mov eax, dword [esp + 0xc]
cmovbe eax, dword [esp + 0x18]
push eax
mov dword [esp + 0x10], eax
mov eax, dword [esi + 0x10]
add eax, edx
push eax
push dword [esp + 0x18]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [esp + 0x18]
add esp, 0xc
add dword [esi + 0x18], eax
cmp eax, dword [esp + 0x18]
je 0x10017953
push dword [esp + 0x10]
call fcn.10037892
add esp, 4
mov eax, 0x800
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x188]
xor ecx, esp
call fcn.1003738f
mov esp, ebp
pop ebp
ret 8
mov eax, dword [edi]
lea ecx, [esp + 0x88]
mov edx, ebx
mov eax, dword [eax + 0x10]
mov dword [ebx], eax
mov eax, ecx
sub edx, eax
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx + 3], al
test al, al
jne 0x10017967
mov ecx, dword [esp + 0x6c]
mov edx, 0x80
mov eax, ecx
mov dword [ebx + 0x108], 0x80
shr eax, 0x17
and eax, 0xffffff01
mov dword [esp + 0x24], eax
mov al, cl
and al, 1
mov byte [esp + 0x17], al
mov eax, ecx
shr eax, 1
and eax, 0xffffff01
mov dword [esp + 0x28], eax
mov eax, ecx
shr eax, 2
and eax, 0xffffff01
mov dword [esp + 0x20], eax
mov eax, ecx
shr eax, 5
and eax, 0xffffff01
mov dword [esp + 0xc], eax
mov eax, ecx
shr eax, 0x1e
shr ecx, 4
or al, cl
test al, 1
je 0x100179e3
mov dword [ebx + 0x108], 0x90
mov edx, 0x90
cmp byte [esp + 0xc], 0
je 0x100179f3
or edx, 0x20
mov dword [ebx + 0x108], edx
cmp byte [esp + 0x28], 0
je 0x10017a03
or edx, 2
mov dword [ebx + 0x108], edx
cmp byte [esp + 0x24], 0
je 0x10017a11
cmp byte [esp + 0x17], 0
je 0x10017a1a
or edx, 1
mov dword [ebx + 0x108], edx
cmp byte [esp + 0x20], 0
je 0x10017a2a
or edx, 4
mov dword [ebx + 0x108], edx
mov eax, dword [esp + 0x50]
mov dword [ebx + 0x124], eax
mov eax, dword [esp + 0x54]
mov dword [ebx + 0x128], eax
lea eax, [esp + 0x30]
push eax
mov eax, dword [esp + 0x4c]
push eax
shr eax, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_DosDateTimeToFileTime]
mov ecx, dword [esp + 0x30]
xor esi, esi
cmp dword [esp + 0x18], 4
mov eax, dword [esp + 0x34]
mov dword [ebx + 0x10c], ecx
mov dword [ebx + 0x114], ecx
mov dword [ebx + 0x11c], ecx
mov ecx, dword [esp + 0x10]
mov dword [ebx + 0x110], eax
mov dword [ebx + 0x118], eax
mov dword [ebx + 0x120], eax
jbe 0x10017ba2
mov byte [esp + 0x1e], 0
nop dword [eax]
nop dword [eax + eax]
movzx eax, byte [esi + ecx]
mov byte [esp + 0x1c], al
movzx eax, byte [esi + ecx + 1]
mov ecx, 0x10050840
mov byte [esp + 0x1d], al
lea eax, [esp + 0x1c]
nop word [eax + eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x10017ae0
test dl, dl
je 0x10017adc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x10017ae0
add eax, 2
add ecx, 2
test dl, dl
jne 0x10017ac0
xor eax, eax
jmp 0x10017ae5
sbb eax, eax
or eax, 1
test eax, eax
je 0x10017b05
mov ecx, dword [esp + 0x10]
movsx eax, byte [esi + ecx + 2]
add eax, 4
add esi, eax
lea eax, [esi + 4]
cmp eax, dword [esp + 0x18]
jb 0x10017aa0
jmp 0x10017ba2
mov eax, dword [esp + 0x10]
mov al, byte [esi + eax + 4]
add esi, 5
movsx ecx, al
mov edx, ecx
shr ecx, 2
shr edx, 1
and cl, 1
and edx, 0xffffff01
mov dword [esp + 0x24], ecx
mov dword [esp + 0x20], edx
test al, 1
je 0x10017b54
mov eax, dword [esp + 0x10]
mov eax, dword [esi + eax]
add esi, 4
cdq
push edx
push eax
call fcn.10017470
mov dword [ebx + 0x120], edx
add esp, 8
mov edx, dword [esp + 0x20]
mov dword [ebx + 0x11c], eax
test dl, dl
je 0x10017b79
mov eax, dword [esp + 0x10]
mov eax, dword [esi + eax]
add esi, 4
cdq
push edx
push eax
call fcn.10017470
add esp, 8
mov dword [ebx + 0x10c], eax
mov dword [ebx + 0x110], edx
cmp byte [esp + 0x24], 0
je 0x10017b9e
mov eax, dword [esp + 0x10]
mov eax, dword [esi + eax]
cdq
push edx
push eax
call fcn.10017470
add esp, 8
mov dword [ebx + 0x114], eax
mov dword [ebx + 0x118], edx
mov ecx, dword [esp + 0x10]
push ecx
call fcn.10037892
mov eax, dword [esp + 0x30]
add edi, 8
mov ecx, 0x4b
mov esi, ebx
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp + 8]
add esp, 4
mov dword [eax + 0x134], ecx
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x188]
xor ecx, esp
call fcn.1003738f
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [esp + 0x194]
mov eax, 0x10000
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.1003738f
mov esp, ebp
pop ebp
ret 8