Function at 0x4046f0
Capabilities:
Read file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x1020]
mov eax, 0x1020
call fcn.00411540
push 0xffffffffffffffff
push 0x43884b
mov eax, dword fs:[0]
push eax
sub esp, 0x58
mov eax, dword [0x4423c8]
xor eax, ebp
mov dword [ebp + 0x101c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x18], ecx
mov eax, dword [ebp + 0x102c]
xor ebx, ebx
mov edi, 8
mov dword [ebp - 4], ebx
mov dword [ebp - 0x10], ebx
cmp dword [ebp + 0x1040], edi
jae 0x404751
lea eax, [ebp + 0x102c]
push ebx
push 0x80
push 3
push ebx
push ebx
push connect
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x1c], eax
cmp eax, 0xffffffff
je 0x404957
lea eax, [ebp + 0x1028]
push eax
call fcn.00409070
add esp, 4
mov dword [ebp - 0x24], eax
xor eax, eax
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x20], edx
push ecx
lea edx, [ebp - 0x2e]
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], eax
push edx
lea eax, [ebp - 0x24]
push eax
mov dword [ebp - 0x48], ebx
call dword [sym.imp.KERNEL32.dll_FileTimeToDosDateTime]
mov edx, dword [ebp + 0x102c]
cmp dword [ebp + 0x1040], edi
jae 0x4047cb
lea edx, [ebp + 0x102c]
xor ecx, ecx
mov eax, edx
mov dword [ebp + 0x18], 7
mov dword [ebp + 0x14], ebx
mov word [ebp + 4], cx
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4047e0
sub eax, esi
sar eax, 1
push eax
push edx
lea ecx, [ebp]
call fcn.00402a30
push 1
push 0xffffffffffffffff
push 0x439664
lea ecx, [ebp]
mov byte [ebp - 4], 1
call fcn.00404440
push 0xffffffffffffffff
inc eax
push eax
lea edx, [ebp - 0x64]
push edx
lea ecx, [ebp]
call fcn.004046b0
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [ebp]
mov byte [ebp - 4], 2
call fcn.00402590
cmp dword [ebp - 0x4c], edi
jb 0x40483f
mov eax, dword [ebp - 0x60]
push eax
call fcn.0040ffa4
add esp, 4
cmp dword [ebp + 0x18], edi
jb 0x40484f
mov edi, dword [ebp + 4]
cmp edi, ebx
jne 0x404852
xor eax, eax
jmp 0x40487b
lea edi, [ebp + 4]
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jle 0x404865
xor eax, eax
jmp 0x40487b
lea esi, [eax + eax]
mov eax, esi
call fcn.00410e30
mov eax, esp
push 3
push esi
push edi
push eax
call fcn.004015f0
mov edx, dword [ebp - 0x18]
push 9
push 8
push ebx
push ebx
push ebx
push ebx
push ebx
lea ecx, [ebp - 0x48]
push ecx
push eax
mov eax, dword [edx + 4]
push eax
call fcn.0040b410
add esp, 0x28
test eax, eax
jne 0x404933
push 0xfff
lea ecx, [ebp + 0x1d]
push ebx
push ecx
mov byte [ebp + 0x1c], bl
call fcn.00410170
mov edi, dword [ebp - 0x1c]
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
add esp, 0xc
push ebx
lea edx, [ebp - 0x14]
push edx
push 0x1000
lea eax, [ebp + 0x1c]
push eax
push edi
mov dword [ebp - 0x14], ebx
call esi
test eax, eax
je 0x40491a
mov eax, dword [ebp - 0x14]
cmp eax, ebx
je 0x40491a
mov edx, dword [ebp - 0x18]
push eax
mov eax, dword [edx + 4]
lea ecx, [ebp + 0x1c]
push ecx
push eax
call fcn.0040a950
add esp, 0xc
test eax, eax
jne 0x404905
cmp dword [ebp - 0x14], 0x1000
jae 0x404905
mov dword [ebp - 0x10], 1
push ebx
lea ecx, [ebp - 0x14]
push ecx
push 0x1000
lea edx, [ebp + 0x1c]
push edx
push edi
call esi
test eax, eax
jne 0x4048d6
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax + 4]
push ecx
call fcn.0040ac30
add esp, 4
neg eax
sbb eax, eax
inc eax
and dword [ebp - 0x10], eax
jmp 0x404936
mov edi, dword [ebp - 0x1c]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
and dword [ebp - 0x10], eax
cmp dword [ebp + 0x18], 8
jb 0x404952
mov edx, dword [ebp + 4]
push edx
call fcn.0040ffa4
add esp, 4
mov edi, 8
cmp dword [ebp + 0x1040], edi
jb 0x40496e
mov eax, dword [ebp + 0x102c]
push eax
call fcn.0040ffa4
add esp, 4
mov eax, dword [ebp - 0x10]
lea esp, [ebp - 0x74]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x101c]
xor ecx, ebp
call fcn.004109f8
add ebp, 0x1020
mov esp, ebp
pop ebp
ret 0x1c