Function at 0x40edf0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18c
mov eax, dword [0x6441a4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x114], ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x12c], edi
cmp eax, 0xffffffff
jl 0x40f35d
mov ecx, dword [edi]
cmp eax, dword [ecx + 4]
jge 0x40f35d
cmp dword [edi + 4], 0xffffffff
je 0x40ee3c
call fcn.0040eb40
mov eax, dword [ebp + 8]
mov dword [edi + 4], 0xffffffff
cmp eax, dword [edi + 0x134]
jne 0x40ee71
cmp eax, 0xffffffff
je 0x40ee76
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 [ebp - 4]
xor ecx, ebp
call fcn.004cdf5d
mov esp, ebp
pop ebp
ret 8
cmp eax, 0xffffffff
jne 0x40eef0
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 [ebp - 4]
xor ecx, ebp
call fcn.004cdf5d
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [edi]
cmp dword [ecx + 0x10], eax
jle 0x40ef32
mov esi, ecx
test esi, esi
je 0x40ef2f
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
push 0
push 0
push eax
call fcn.0040dec0
xor ecx, ecx
add esp, 0x1c
test eax, eax
mov eax, dword [ebp + 8]
sete cl
mov dword [esi + 0x18], ecx
mov ecx, dword [edi]
cmp dword [ecx + 0x10], eax
jge 0x40ef8f
mov ebx, dword [ebp + 8]
mov esi, ecx
test esi, esi
je 0x40ef84
cmp dword [esi + 0x18], 0
je 0x40ef84
mov edx, dword [esi + 0x10]
inc edx
cmp edx, dword [esi + 4]
je 0x40ef84
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.0040dec0
xor ecx, ecx
add esp, 0x1c
test eax, eax
sete cl
mov dword [esi + 0x18], ecx
mov ecx, dword [edi]
cmp dword [ecx + 0x10], ebx
jl 0x40ef37
mov ebx, dword [ebp - 0x114]
sub esp, 0x10
lea eax, [ebp - 0x110]
lea edx, [ebp - 0x188]
push 0x104
push eax
push 0
call fcn.0040dec0
mov ecx, dword [edi]
lea eax, [ebp - 0x120]
add esp, 0x1c
lea edx, [ebp - 0x124]
push eax
lea eax, [ebp - 0x114]
push eax
call fcn.0040e5b0
add esp, 8
test eax, eax
je 0x40efe8
mov eax, 0x700
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004cdf5d
mov esp, ebp
pop ebp
ret 8
mov eax, dword [edi]
mov ecx, dword [eax]
cmp byte [ecx], 0
je 0x40f014
cmp byte [ecx + 1], 0
je 0x40f0ab
mov eax, dword [ecx + 0xc]
add eax, dword [ebp - 0x114]
push 0
push 0
push eax
push dword [ecx + 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x40f01d
mov eax, dword [ebp - 0x114]
mov dword [ecx + 0x18], eax
push dword [ebp - 0x120]
call fcn.004ce42c
mov ecx, dword [edi]
add esp, 4
mov dword [ebp - 0x114], eax
mov esi, dword [ecx]
cmp byte [esi], 0
je 0x40f063
push 0
lea ecx, [ebp - 0x11c]
push ecx
push dword [ebp - 0x120]
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40f05b
mov byte [esi + 8], 1
mov edi, dword [ebp - 0x11c]
jmp 0x40f095
mov edx, dword [esi + 0x18]
mov eax, dword [ebp - 0x120]
mov edi, dword [esi + 0x14]
add eax, edx
sub edi, edx
cmp eax, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
cmovbe edi, dword [ebp - 0x120]
add eax, edx
push edi
push eax
push dword [ebp - 0x114]
call fcn.004d0380
add esp, 0xc
add dword [esi + 0x18], edi
cmp edi, dword [ebp - 0x120]
je 0x40f0c3
push dword [ebp - 0x114]
call fcn.004ce3f7
add esp, 4
mov eax, 0x800
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004cdf5d
mov esp, ebp
pop ebp
ret 8
mov eax, dword [ebp - 0x12c]
lea ecx, [ebp - 0x110]
mov edx, ecx
mov eax, dword [eax]
mov eax, dword [eax + 0x10]
mov dword [ebx], eax
mov eax, ebx
sub eax, edx
lea edx, [eax + 4]
nop
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x40f0e0
mov eax, dword [ebp - 0x154]
mov ecx, eax
shr ecx, 0x17
mov edx, eax
and ecx, 0xffffff01
shr edx, 5
mov dword [ebp - 0x128], ecx
and dl, 1
mov cl, al
mov dword [ebx + 0x108], 0x80
and cl, 1
mov byte [ebp - 0x115], cl
mov ecx, eax
shr ecx, 1
and ecx, 0xffffff01
mov dword [ebp - 0x11c], ecx
mov ecx, eax
shr ecx, 2
and ecx, 0xffffff01
mov dword [ebp - 0x124], ecx
mov ecx, 0x80
test eax, 0x40000010
je 0x40f15d
mov dword [ebx + 0x108], 0x90
mov ecx, 0x90
test dl, dl
je 0x40f16a
or ecx, 0x20
mov dword [ebx + 0x108], ecx
cmp byte [ebp - 0x11c], 0
je 0x40f17c
or ecx, 2
mov dword [ebx + 0x108], ecx
cmp byte [ebp - 0x128], 0
je 0x40f18e
cmp byte [ebp - 0x115], 0
je 0x40f197
or ecx, 1
mov dword [ebx + 0x108], ecx
cmp byte [ebp - 0x124], 0
je 0x40f1a9
or ecx, 4
mov dword [ebx + 0x108], ecx
mov eax, dword [ebp - 0x170]
mov dword [ebx + 0x124], eax
mov eax, dword [ebp - 0x16c]
mov dword [ebx + 0x128], eax
lea eax, [ebp - 0x134]
push eax
mov eax, dword [ebp - 0x178]
push eax
shr eax, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_DosDateTimeToFileTime]
mov ecx, dword [ebp - 0x134]
xor esi, esi
cmp dword [ebp - 0x120], 4
mov eax, dword [ebp - 0x130]
mov edi, dword [ebp - 0x114]
mov dword [ebx + 0x10c], ecx
mov dword [ebx + 0x110], eax
mov dword [ebx + 0x114], ecx
mov dword [ebx + 0x118], eax
mov dword [ebx + 0x11c], ecx
mov dword [ebx + 0x120], eax
jbe 0x40f324
mov byte [ebp - 0x11a], 0
nop word [eax + eax]
movzx eax, byte [esi + edi]
mov ecx, 0x6294f4
mov byte [ebp - 0x11c], al
movzx eax, byte [esi + edi + 1]
mov byte [ebp - 0x11b], al
lea eax, [ebp - 0x11c]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40f270
test dl, dl
je 0x40f26c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40f270
add eax, 2
add ecx, 2
test dl, dl
jne 0x40f250
xor eax, eax
jmp 0x40f275
sbb eax, eax
or eax, 1
test eax, eax
je 0x40f293
movsx eax, byte [esi + edi + 2]
add eax, 4
add esi, eax
lea eax, [esi + 4]
cmp eax, dword [ebp - 0x120]
jb 0x40f230
jmp 0x40f324
mov al, byte [esi + edi + 4]
add esi, 5
movsx ecx, al
mov edx, ecx
shr ecx, 2
shr edx, 1
and cl, 1
and edx, 0xffffff01
mov dword [ebp - 0x128], ecx
mov dword [ebp - 0x124], edx
test al, 1
je 0x40f2e0
mov eax, dword [esi + edi]
add esi, 4
cdq
push edx
push eax
call fcn.0040ebb0
mov dword [ebx + 0x120], edx
add esp, 8
mov edx, dword [ebp - 0x124]
mov dword [ebx + 0x11c], eax
test dl, dl
je 0x40f301
mov eax, dword [esi + edi]
add esi, 4
cdq
push edx
push eax
call fcn.0040ebb0
add esp, 8
mov dword [ebx + 0x10c], eax
mov dword [ebx + 0x110], edx
cmp byte [ebp - 0x128], 0
je 0x40f324
mov eax, dword [esi + edi]
cdq
push edx
push eax
call fcn.0040ebb0
add esp, 8
mov dword [ebx + 0x114], eax
mov dword [ebx + 0x118], edx
push edi
call fcn.004ce3f7
mov eax, dword [ebp - 0x12c]
mov ecx, 0x4b
mov esi, ebx
add esp, 4
lea edi, [eax + 8]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp + 8]
mov dword [eax + 0x134], ecx
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004cdf5d
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [ebp - 4]
mov eax, 0x10000
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004cdf5d
mov esp, ebp
pop ebp
ret 8