Function at 0x401a60
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x484
mov eax, dword [0x43a004]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov esi, ecx
mov dword [ebp - 0x480], edx
xor edi, edi
mov dword [ebp - 0x474], esi
push edi
mov dword [ebp - 0x47c], eax
mov dword [ebp - 0x478], 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [0x43bbd0]
test eax, eax
je 0x401b9d
cmp dword [eax + 4], edi
je 0x401b9d
push edi
lea eax, [ebp - 0x210]
push eax
push 0x104
push esi
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
lea eax, [ebp - 0x210]
push eax
mov eax, dword [0x43bbd0]
add eax, 0x14
push eax
call fcn.0041f4c2
add esp, 8
test eax, eax
jne 0x401b9d
mov dword [ebp - 0x478], 1
mov ecx, dword [0x43bbd0]
test ecx, ecx
je 0x401be6
cmp ebx, dword [ecx + 0x254]
jne 0x401be6
mov eax, dword [ecx + 4]
test eax, eax
je 0x401b2d
cmp dword [ecx + 0x10], 0
je 0x401b2d
push eax
call fcn.0041f3e5
mov ecx, dword [0x43bbd0]
add esp, 4
mov eax, dword [ecx + 0x220]
test eax, eax
je 0x401b46
push eax
call fcn.0041f3e5
mov ecx, dword [0x43bbd0]
add esp, 4
mov eax, dword [ecx + 0x21c]
test eax, eax
je 0x401b5f
push eax
call fcn.0041f3e5
mov ecx, dword [0x43bbd0]
add esp, 4
mov edx, dword [ebx + 8]
lea esi, [ebx + 8]
test edx, edx
je 0x401b7a
nop dword [eax]
mov eax, dword [edx]
mov esi, edx
mov edx, eax
test eax, eax
jne 0x401b70
mov eax, dword [ecx + 0x250]
mov dword [esi], eax
mov eax, dword [ebx + 8]
mov dword [ecx + 0x250], eax
mov dword [ebx + 8], 0
mov ebx, dword [ebp - 0x478]
jmp 0x401c5d
push 0
push 0x8000080
push 3
push 0
push 7
push 0x80000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x401af7
mov edx, 0x12d
mov ecx, 0x44a020
call fcn.0041cc00
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041d22b
mov esp, ebp
pop ebp
ret
xor esi, esi
test ebx, ebx
je 0x401c0b
test ecx, ecx
je 0x401c0b
mov esi, dword [ecx + 0x258]
mov dword [ecx + 0x258], 0
call fcn.00401830
mov ecx, dword [0x43bbd0]
mov ebx, dword [ebp - 0x478]
mov dword [ebp - 0x470], ecx
test ebx, ebx
je 0x401c41
mov eax, dword [ecx + 4]
mov dword [ebp - 0x46c], eax
mov eax, dword [ecx + 8]
mov dword [ebp - 0x468], eax
mov dword [ebp - 0x464], 0
mov dword [ebp - 0x460], 0
lea ecx, [ebp - 0x470]
mov dword [ebp - 0x220], 0
mov dword [0x43bbd0], ecx
mov dword [ebp - 0x218], esi
push 0
lea eax, [ecx + 0x14]
push eax
push 0x104
push dword [ebp - 0x474]
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
test ebx, ebx
jne 0x401cf5
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, dword [0x43bbd0]
mov dword [ecx + 8], eax
inc eax
push eax
call fcn.0041f424
mov edx, dword [0x43bbd0]
add esp, 4
mov dword [edx + 4], eax
test eax, eax
je 0x401cd9
push ebx
push ebx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [0x43bbd0]
push ebx
lea eax, [ecx + 8]
push eax
push dword [eax]
push dword [ecx + 4]
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [0x43bbd0]
mov ecx, dword [edx + 8]
mov eax, dword [edx + 4]
mov byte [ecx + eax], bl
mov dword [edx + 0x10], 1
jmp 0x401ce7
mov dword [edx + 8], 0
mov dword [edx + 0x10], 0
push edi
mov dword [edx + 0xc], 0
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [0x43bbd0]
mov ebx, dword [ebp - 0x47c]
mov esi, ebx
mov dword [ecx + 0xc], 0
mov eax, dword [0x43a8f0]
mov dword [ecx + 0x24c], eax
mov dword [ecx + 0x224], 0
mov dword [ecx + 0x228], 1
mov dword [ecx + 0x22c], 2
mov dword [ecx + 0x230], 3
mov dword [ecx + 0x234], 4
mov dword [ecx + 0x238], 5
mov dword [ecx + 0x23c], 6
mov dword [ecx + 0x240], 7
mov dword [ecx + 0x244], 8
mov dword [ecx + 0x248], 9
mov ecx, dword [ebp - 0x480]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401d82
sub ecx, edx
mov edx, ebx
sar ecx, 1
lea edi, [edx + 2]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x401d96
sub edx, edi
sar edx, 1
lea eax, [edx + ecx]
lea eax, [eax*2 + 6]
push eax
call fcn.0041f424
mov ebx, eax
add esp, 4
mov dword [ebp - 0x474], ebx
test ebx, ebx
jne 0x401de0
lea edx, [eax + 0x6d]
mov ecx, 0x44a020
call fcn.0041cc00
mov dword [0x43bbd4], 1
jmp 0x401ee3
mov edi, dword [ebp - 0x480]
test edi, edi
je 0x401e31
cmp word [edi], 0
je 0x401e31
mov edx, ebx
mov ecx, edi
sub edx, edi
nop word [eax + eax]
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [ecx + edx - 2], ax
test ax, ax
jne 0x401e00
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401e15
sub ecx, edx
xor eax, eax
sar ecx, 1
lea edi, [ebx + ecx*2]
mov word [edi], ax
add edi, 2
jmp 0x401e33
mov edi, ebx
mov eax, esi
cmp word [eax], 0
je 0x401ede
nop
xor ebx, ebx
movzx eax, word [esi]
push 8
push eax
call fcn.0041f340
add esp, 8
test eax, eax
jne 0x401e70
movzx eax, word [esi]
mov ecx, eax
test ax, ax
je 0x401e78
push eax
push 0x436be0
call fcn.0041de51
add esp, 8
test eax, eax
je 0x401e75
add esi, 2
jmp 0x401e42
movzx ecx, word [esi]
test cx, cx
je 0x401ed8
nop dword [eax]
test ebx, ebx
jne 0x401eab
movzx eax, word [esi]
push 8
push eax
call fcn.0041f340
add esp, 8
test eax, eax
jne 0x401ec7
movzx eax, word [esi]
push eax
push 0x436be0
call fcn.0041de51
add esp, 8
test eax, eax
jne 0x401ec7
movzx ecx, word [esi]
xor eax, eax
cmp ecx, 0x22
mov word [edi], cx
sete al
add esi, 2
xor ebx, eax
add edi, 2
cmp word [esi], 0
jne 0x401e80
xor eax, eax
mov word [edi], ax
add edi, 2
cmp word [esi], ax
jne 0x401e40
mov ebx, dword [ebp - 0x474]
xor eax, eax
mov word [edi], ax
mov eax, dword [0x43bbd0]
push dword [ebp - 0x47c]
mov dword [eax + 0x21c], ebx
call fcn.0041f2df
mov esi, dword [0x43bbd0]
add esp, 4
mov dword [esi + 0x220], eax
test eax, eax
jne 0x401f39
lea edx, [eax + 0x6d]
mov ecx, 0x44a020
call fcn.0041cc00
mov dword [0x43bbd4], 1
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041d22b
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x480]
cmp word [eax], 0x3a
jne 0x401f54
push eax
call fcn.0040fba0
mov esi, dword [0x43bbd0]
add esp, 4
mov ebx, dword [0x43bbf4]
lea eax, [ebp - 0x470]
mov dword [0x43bbf4], 0
cmp esi, eax
jne 0x402074
cmp dword [0x43bbd8], 0
jne 0x402074
xor ecx, ecx
call fcn.00415300
mov edi, eax
test edi, edi
je 0x402062
cmp dword [0x43a8f0], 0
je 0x401ff7
cmp dword [0x43bbe0], 0
jne 0x401ff7
cmp byte [edi + 0xc], 1
je 0x401ff7
cmp dword [0x43bbdc], 0
jne 0x401fce
push 1
lea eax, [ebp - 0x474]
mov dword [ebp - 0x474], 0xa
push eax
push 0x44a060
call fcn.0041c900
call fcn.00416080
mov ecx, edi
call fcn.00415470
push 1
lea eax, [ebp - 0x474]
mov dword [ebp - 0x474], 0xa
push eax
push 0x44a060
call fcn.0041c900
mov eax, dword [0x43bbd0]
mov ecx, edi
mov dword [eax + 0x254], edi
call fcn.00403b90
mov ecx, dword [edi]
test ecx, ecx
je 0x402014
call fcn.00415e00
mov ecx, dword [edi + 4]
test ecx, ecx
je 0x402020
call fcn.00415e00
mov eax, dword [edi + 8]
test eax, eax
je 0x402038
mov esi, dword [eax]
push eax
call fcn.0041f3e5
add esp, 4
mov eax, esi
test esi, esi
jne 0x402027
mov al, byte [edi + 0xc]
cmp al, 7
je 0x402043
cmp al, 8
jne 0x402059
push dword [edi + 0x14]
call fcn.0041f3e5
add esp, 4
push dword [edi + 0x18]
call fcn.0041f3e5
add esp, 4
push edi
call fcn.0041f3e5
add esp, 4
lea eax, [ebp - 0x470]
cmp dword [0x43bbd0], eax
je 0x401f72
mov ecx, dword [ebp - 4]
mov eax, dword [0x43bbd4]
xor ecx, ebp
pop edi
pop esi
mov dword [0x43bbf4], ebx
pop ebx
call fcn.0041d22b
mov esp, ebp
pop ebp
ret