Function at 0x422e84
Capabilities:
Read file on windows

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffff90
mov esi, edx
mov dword [esp], eax
mov byte [esp + 4], 0xff
xor eax, eax
mov dword [esp + 8], eax
xor ebx, ebx
mov edx, 0x1000000
mov eax, dword [0x4c0e4c]
call fcn.004066e4
push 0x352
push 0x40
call sub.kernel32.dll_GlobalAlloc
mov edi, eax
test edi, edi
jne 0x422ef3
call sub.kernel32.dll_GetLastError_1
call fcn.004ae200
mov eax, dword [0x4bedb0]
mov edx, 1
call fcn.004b12a8
push 0
push 0x1000000
call fcn.004b1e30
mov edx, eax
mov ax, 0xb
call fcn.004acdac
jmp 0x423288
push 0
push 0x80
push 3
push 0
push 3
push 0xc0000000
push esi
call sub.kernel32.dll_CreateFileA_1
mov dword [0x4c0e58], eax
cmp dword [0x4c0e58], 0xffffffff
je 0x423288
mov eax, dword [0x4c0e58]
call fcn.004b22b8
fistp qword [0x4c0e5c]
wait
mov dword [0x4c0e64], 0
mov dword [0x4c0e68], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], 0
mov eax, 0x4c0e5c
mov edx, dword [eax]
mov dword [esp + 0x18], edx
mov edx, dword [eax + 4]
mov dword [esp + 0x1c], edx
mov byte [esp + 4], 0
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
sub eax, dword [esp + 0x10]
sbb edx, dword [esp + 0x14]
cmp edx, 0
jne 0x422f8a
cmp eax, 0x100000
ja 0x422f90
jmp 0x4231b2
jle 0x4231b2
push 0
push 2
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
sub eax, dword [esp + 0x18]
sbb edx, dword [esp + 0x1c]
call fcn.004054b0
add eax, dword [esp + 0x10]
adc edx, dword [esp + 0x14]
push edx
push eax
xor eax, eax
mov al, bl
xor edx, edx
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], edx
push 0
lea eax, [esp + 0x24]
call fcn.004af014
push eax
fild qword [esp + 0x28]
add esp, 0xfffffff8
fistp qword [esp]
wait
call fcn.004af008
push eax
mov eax, dword [0x4c0e58]
push eax
call sub.kernel32.dll_SetFilePointer_1
push 0
lea eax, [esp + 0xc]
push eax
push 0x352
push edi
mov eax, dword [0x4c0e58]
push eax
call sub.kernel32.dll_ReadFile_1
cmp dword [esp + 8], 0x352
jae 0x423030
mov byte [esp + 4], 0xff
push edi
call sub.kernel32.dll_GlobalFree
mov eax, dword [0x4c0e58]
push eax
call sub.kernel32.dll_CloseHandle_1
jmp 0x423288
xor esi, esi
jmp 0x423035
inc esi
lea eax, [esi + edi]
cmp byte [eax], 0xa
je 0x423045
cmp esi, 0x352
jl 0x423034
cmp esi, 0x352
jne 0x423056
mov eax, esi
add bl, al
jmp 0x4231a7
xor ebx, ebx
inc esi
mov eax, esi
mov dl, byte [0x4c0e54]
dec dl
je 0x42306f
dec dl
je 0x423096
dec dl
je 0x42308f
jmp 0x42309d
cmp byte [0x4c0e74], 7
jne 0x42307f
mov byte [esp + 0xc], 2
jmp 0x4230b8
cmp byte [0x4c0e74], 8
jne 0x4230b8
mov byte [esp + 0xc], 1
jmp 0x4230b8
mov byte [esp + 0xc], 1
jmp 0x4230b8
mov byte [esp + 0xc], 5
jmp 0x4230b8
mov byte [esp + 4], 0xff
push edi
call sub.kernel32.dll_GlobalFree
mov eax, dword [0x4c0e58]
push eax
call sub.kernel32.dll_CloseHandle_1
jmp 0x423288
xor edx, edx
mov dl, byte [esp + 0xc]
dec edx
test edx, edx
jle 0x4230eb
jmp 0x4230c6
inc eax
lea ecx, [eax + edi]
cmp byte [ecx], 0x2c
je 0x4230d5
cmp eax, 0x352
jl 0x4230c5
cmp eax, 0x352
jne 0x4230e5
mov ecx, esi
sub cl, 2
add bl, cl
jmp 0x4230e8
xor ebx, ebx
inc eax
dec edx
jne 0x4230c6
mov ebp, eax
jmp 0x4230f0
inc ebp
lea edx, [ebp + edi]
cmp byte [edx], 0x2c
je 0x423101
cmp ebp, 0x352
jl 0x4230ef
cmp ebp, 0x352
jne 0x423114
mov eax, esi
sub al, 2
add bl, al
jmp 0x4231a7
xor ebx, ebx
inc ebp
mov edx, ebp
sub edx, eax
push edx
add eax, edi
push eax
lea eax, [esp + 0x30]
push eax
call sub.kernel32.dll_lstrcpynA
lea eax, [esp + 0x28]
mov dl, 0x22
call fcn.00421cd0
lea eax, [esp + 0x28]
mov dl, 0x20
call fcn.00421cd0
lea eax, [esp + 0x28]
mov dl, 0xa
call fcn.00421cd0
lea eax, [esp + 0x28]
mov dl, 0xd
call fcn.00421cd0
lea eax, [esp + 0x28]
push eax
mov eax, dword [esp + 4]
push eax
call sub.kernel32.dll_lstrcmpiA
test eax, eax
jle 0x42317a
mov eax, dword [esp + 0x20]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0x14], eax
jmp 0x4231a7
test eax, eax
jge 0x423199
mov eax, esi
cdq
add eax, dword [esp + 0x20]
adc edx, dword [esp + 0x24]
sub eax, 1
sbb edx, 0
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], edx
jmp 0x4231a7
mov byte [esp + 4], 1
mov edx, ebp
mov eax, edi
call fcn.0042280c
cmp byte [esp + 4], 1
jne 0x422f69
cmp byte [esp + 4], 1
je 0x423277
push 0
lea eax, [esp + 0x14]
call fcn.004af014
push eax
fild qword [esp + 0x18]
add esp, 0xfffffff8
fistp qword [esp]
wait
call fcn.004af008
push eax
mov eax, dword [0x4c0e58]
push eax
call sub.kernel32.dll_SetFilePointer_1
push 0
lea eax, [esp + 0xc]
push eax
mov eax, dword [esp + 0x20]
sub eax, dword [esp + 0x18]
push eax
mov eax, dword [0x4c0e4c]
push eax
mov eax, dword [0x4c0e58]
push eax
call sub.kernel32.dll_ReadFile_1
xor esi, esi
jmp 0x42320b
inc esi
mov eax, dword [0x4c0e4c]
add eax, esi
cmp byte [eax], 0xa
jne 0x42320a
inc esi
mov ecx, dword [esp + 0x18]
sub ecx, dword [esp + 0x10]
sub ecx, esi
mov edx, dword [0x4c0e4c]
add edx, esi
mov eax, dword [0x4c0e4c]
call fcn.004066d4
mov eax, dword [esp + 8]
xor edx, edx
push edx
push eax
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
sub eax, dword [esp + 0x18]
sbb edx, dword [esp + 0x1c]
cmp edx, dword [esp + 4]
jne 0x42325b
cmp eax, dword [esp]
pop edx
pop eax
jbe 0x423277
jmp 0x42325f
pop edx
pop eax
jle 0x423277
mov byte [esp + 4], 0xff
push edi
call sub.kernel32.dll_GlobalFree
mov eax, dword [0x4c0e58]
push eax
call sub.kernel32.dll_CloseHandle_1
jmp 0x423288
push edi
call sub.kernel32.dll_GlobalFree
mov eax, dword [0x4c0e58]
push eax
call sub.kernel32.dll_CloseHandle_1
mov al, byte [esp + 4]
add esp, 0x70
pop ebp
pop edi
pop esi
pop ebx
ret