Function at 0x41f180
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x190
mov eax, dword [esp + 0x194]
push esi
push 0
push 0x80
push 3
push 0
push 0
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
mov dword [esp + 0xc], esi
je 0x41f762
push ebx
push ebp
push edi
lea ecx, [esp + 0x10]
push 0
push ecx
lea edx, [esp + 0x24]
push 0xc
push edx
push esi
mov dword [esp + 0x24], 0xc
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x1c]
mov ecx, dword [0x484ec8]
xor ebp, ebp
mov dword [esp + 0x40], eax
test eax, eax
mov dword [esp + 0x28], ecx
jbe 0x41f340
lea ebx, [esp + 0x44]
jmp 0x41f1fc
mov esi, dword [esp + 0x18]
lea edx, [esp + 0x10]
push 0
push edx
lea eax, [esp + 0x8c]
push 0xb0
push eax
push esi
mov dword [esp + 0x24], 0xb0
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [0x46b7c4]
cmp eax, 0xffffffff
jne 0x41f28a
mov ecx, dword [0x4839d8]
mov eax, dword [0x4839dc]
cmp ecx, eax
jl 0x41f260
mov edx, dword [0x4839e0]
push edx
push 0x4839d8
call fcn.00407e80
add esp, 8
test eax, eax
jne 0x41f260
mov eax, dword [0x4839d8]
xor esi, esi
dec eax
mov dword [esi + 0x80], eax
jmp 0x41f2bb
mov esi, dword [0x4839d8]
mov eax, dword [0x4839e8]
inc esi
mov dword [0x4839d8], esi
dec esi
imul esi, dword [0x4839e4]
add esi, eax
mov eax, dword [0x4839d8]
dec eax
mov dword [esi + 0x80], eax
jmp 0x41f2bb
mov ecx, 0x4839d8
test ecx, ecx
je 0x41f2b0
cmp eax, dword [0x4839d8]
jge 0x41f2b0
test eax, eax
jl 0x41f2b0
mov esi, dword [0x4839e4]
imul esi, eax
add esi, dword [0x4839e8]
jmp 0x41f2b2
xor esi, esi
mov edx, dword [esi + 4]
mov dword [0x46b7c4], edx
mov edi, dword [esi + 0x80]
push 0
push esi
call fcn.0041be40
xor eax, eax
add esp, 8
mov dword [esi + 0x7c], eax
mov dword [esi + 0x30], eax
mov dword [esi + 0x34], eax
mov dword [esi + 0x38], eax
mov dword [esi + 0x3c], eax
mov eax, 0x4839d8
test eax, eax
mov dword [esi + 0x80], edi
je 0x41f30a
cmp edi, dword [0x4839d8]
jge 0x41f30a
test edi, edi
jl 0x41f30a
mov esi, edi
mov eax, dword [0x4839e8]
imul esi, dword [0x4839e4]
add esi, eax
jmp 0x41f30c
xor esi, esi
lea ecx, [esp + 0x84]
push 0xb0
push ecx
push esi
call fcn.00450dd0
mov edx, dword [esp + 0x34]
mov eax, dword [esi + 0x7c]
add eax, edx
add esp, 0xc
mov dword [esi + 0x7c], eax
mov eax, dword [esp + 0x1c]
mov dword [ebx], edi
inc ebp
add ebx, 4
cmp ebp, eax
jb 0x41f1f8
mov eax, dword [esp + 0x20]
xor esi, esi
test eax, eax
jbe 0x41f3e7
mov edi, 0x11c
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x10]
push 0
push eax
lea ecx, [esp + 0x8c]
push edi
push ecx
push edx
mov dword [esp + 0x24], edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x90]
add ecx, eax
mov eax, dword [0x484ecc]
mov dword [esp + 0x90], ecx
mov ecx, dword [0x484ec8]
cmp ecx, eax
jl 0x41f3ad
mov edx, dword [0x484ed0]
push edx
push 0x484ec8
call fcn.00407e80
add esp, 8
test eax, eax
je 0x41f3c8
mov eax, dword [0x484ec8]
mov ecx, dword [0x484ed8]
inc eax
mov dword [0x484ec8], eax
dec eax
imul eax, dword [0x484ed4]
add eax, ecx
lea ecx, [esp + 0x84]
push edi
push ecx
push eax
call fcn.00450dd0
mov eax, dword [esp + 0x2c]
add esp, 0xc
inc esi
cmp esi, eax
jb 0x41f353
mov eax, dword [esp + 0x24]
lea edx, [eax + eax*4]
lea eax, [eax + edx*2]
shl eax, 3
push eax
call fcn.00450d2b
mov ebp, eax
mov eax, dword [esp + 0x28]
mov edi, ebp
add esp, 4
lea ecx, [eax + eax*4]
xor esi, esi
mov ebx, 0x58
lea ecx, [eax + ecx*2]
xor eax, eax
shl ecx, 3
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x24]
mov edi, ebp
test eax, eax
jbe 0x41f452
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x10]
push 0
push eax
push ebx
push edi
push ecx
mov dword [esp + 0x24], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x24]
inc esi
add edi, ebx
cmp esi, eax
jb 0x41f42f
lea edx, [eax + eax*4]
lea ecx, [eax + edx*2]
shl ecx, 3
test eax, eax
jbe 0x41f46b
lea edx, [ebp + 0x2c]
mov esi, dword [edx]
add edx, ebx
add ecx, esi
dec eax
jne 0x41f462
push ecx
call fcn.00450d2b
mov edi, eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x30], edi
lea ecx, [eax + eax*4]
lea edx, [eax + ecx*2]
shl edx, 3
push edx
push ebp
push edi
call fcn.00450dd0
push ebp
call fcn.00450d9f
mov eax, dword [esp + 0x38]
add esp, 0x14
xor edx, edx
lea ecx, [eax + eax*4]
lea ecx, [eax + ecx*2]
shl ecx, 3
test eax, eax
jbe 0x41f4bb
lea esi, [edi + ecx]
lea ecx, [edi + 0x54]
mov dword [ecx], esi
mov eax, dword [esp + 0x24]
inc edx
add ecx, ebx
cmp edx, eax
jb 0x41f4ae
test eax, eax
mov esi, edi
mov dword [esp + 0x14], 0
jbe 0x41f602
mov ecx, dword [esi + 0x2c]
xor eax, eax
mov dword [esp + 0x10], ecx
mov edi, dword [esi + 0x54]
mov edx, ecx
push 0
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x14]
mov edx, dword [esi + 0x54]
lea eax, [esp + 0x14]
push eax
mov eax, dword [esp + 0x20]
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 4
push esi
call fcn.004142b0
add esp, 8
test esi, esi
jne 0x41f516
or eax, 0xffffffff
jmp 0x41f590
mov ecx, dword [0x484ee8]
xor ebp, ebp
test ecx, ecx
jle 0x41f587
mov edx, dword [0x484ef8]
mov eax, 0x484ee8
test eax, eax
je 0x41f53d
cmp ebp, ecx
jge 0x41f53d
test ebp, ebp
jl 0x41f53d
mov edi, edx
jmp 0x41f53f
xor edi, edi
mov eax, dword [esi]
mov ebx, dword [edi]
cmp ebx, eax
jne 0x41f56b
mov ecx, 0xfffffffc
sub edi, esi
lea eax, [esi + 4]
sub ecx, esi
mov bl, byte [edi + eax]
cmp bl, byte [eax]
jne 0x41f565
inc eax
lea ebx, [ecx + eax]
cmp ebx, 0x10
jae 0x41f57a
jmp 0x41f553
mov ecx, dword [0x484ee8]
mov edi, dword [0x484ef4]
inc ebp
add edx, edi
cmp ebp, ecx
jge 0x41f587
jmp 0x41f528
push esi
call fcn.0040bac0
add esp, 4
mov eax, ebp
jmp 0x41f590
push esi
call fcn.0041f780
add esp, 4
mov ecx, dword [esp + 0x20]
xor edi, edi
test ecx, ecx
jbe 0x41f5e6
mov edx, dword [esp + 0x28]
mov ebx, dword [esp + 0x14]
mov ecx, 0x484ec8
test ecx, ecx
je 0x41f5ca
cmp edx, dword [0x484ec8]
jge 0x41f5ca
test edx, edx
jl 0x41f5ca
mov ecx, edx
mov ebp, dword [0x484ed8]
imul ecx, dword [0x484ed4]
add ecx, ebp
jmp 0x41f5cc
xor ecx, ecx
cmp dword [ecx + 0xe0], ebx
jne 0x41f5da
mov dword [ecx + 0xe0], eax
mov ecx, dword [esp + 0x20]
inc edi
inc edx
cmp edi, ecx
jb 0x41f5a2
jmp 0x41f5ea
mov ebx, dword [esp + 0x14]
mov eax, dword [esp + 0x24]
inc ebx
add esi, 0x58
cmp ebx, eax
mov dword [esp + 0x14], ebx
jb 0x41f4cd
mov edi, dword [esp + 0x2c]
push edi
call fcn.00450d9f
mov eax, dword [esp + 0x1a8]
xor edx, edx
mov dword [esp + 0x34], edx
add esp, 4
mov dword [esp + 0x34], edx
xor esi, esi
mov dword [esp + 0x38], edx
xor edi, edi
mov dword [esp + 0x3c], edx
mov edx, eax
mov cl, byte [eax]
cmp cl, 0x5c
jne 0x41f634
lea edx, [eax + 1]
cmp cl, 0x2e
je 0x41f646
test cl, cl
je 0x41f646
inc eax
inc edi
cmp edi, 0x64
jl 0x41f62a
jmp 0x41f648
mov esi, eax
test edx, edx
je 0x41f66a
test esi, esi
je 0x41f66a
cmp esi, edx
jbe 0x41f66a
sub esi, edx
lea eax, [esp + 0x30]
push esi
push edx
push eax
call fcn.00450dd0
add esp, 0xc
mov byte [esp + esi + 0x30], 0
lea ecx, [esp + 0x30]
xor edx, edx
mov al, byte [ecx]
test al, al
je 0x41f689
cmp al, 0x61
jl 0x41f682
cmp al, 0x7a
jg 0x41f682
sub al, 0x20
mov byte [ecx], al
inc ecx
inc edx
cmp edx, 0x10
jl 0x41f670
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [0x47db08]
mov ebp, dword [0x47db14]
xor edi, edi
test edx, edx
jbe 0x41f704
mov eax, dword [0x47db18]
mov dword [esp + 0x14], eax
mov ecx, 0x47db08
test ecx, ecx
je 0x41f6f9
cmp edi, edx
jge 0x41f6f9
test edi, edi
jl 0x41f6f9
test eax, eax
je 0x41f6f9
lea esi, [esp + 0x30]
mov bl, byte [eax]
mov cl, bl
cmp bl, byte [esi]
jne 0x41f6ec
test cl, cl
je 0x41f6e8
mov bl, byte [eax + 1]
mov cl, bl
cmp bl, byte [esi + 1]
jne 0x41f6ec
add eax, 2
add esi, 2
test cl, cl
jne 0x41f6c8
xor eax, eax
jmp 0x41f6f1
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x41f755
mov eax, dword [esp + 0x14]
inc edi
add eax, ebp
cmp edi, edx
mov dword [esp + 0x14], eax
jb 0x41f6af
cmp edx, dword [0x47db0c]
jl 0x41f730
mov edx, dword [0x47db10]
push edx
push 0x47db08
call fcn.00407e80
add esp, 8
test eax, eax
je 0x41f755
mov ebp, dword [0x47db14]
mov edx, dword [0x47db08]
push ebp
imul ebp, edx
mov esi, dword [0x47db18]
lea eax, [esp + 0x34]
add ebp, esi
push eax
push ebp
call fcn.00450dd0
mov eax, dword [0x47db08]
add esp, 0xc
inc eax
mov dword [0x47db08], eax
pop edi
pop ebp
pop ebx
mov al, 1
pop esi
add esp, 0x190
ret
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
pop esi
add esp, 0x190
ret