Function at 0x1005c440
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100a1e70
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x40
push ebx
push esi
mov esi, ecx
mov dword [ebp - 0x38], edx
mov dword [ebp - 0x18], 0
push edi
test esi, esi
je 0x1005c7a1
cmp word [esi], 0
je 0x1005c7a1
push 0x100b33dc
push esi
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x1005c7a1
push 0x104
push esi
lea ecx, [ebp - 0x48]
xor edi, edi
call fcn.1004d280
mov esi, dword [ebp - 0x44]
mov eax, esi
test esi, esi
jne 0x1005c4ac
mov eax, dword [ebp - 0x48]
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [ebp - 0x14], ebx
mov dword [ebp - 4], 0
test esi, esi
je 0x1005c4de
push esi
call fcn.10086818
add esp, 4
mov dword [ebp - 4], 0xffffffff
cmp ebx, 0xffffffff
je 0x1005c764
mov ecx, ebx
call fcn.1006de30
mov ecx, dword [ebp - 0x38]
mov ebx, eax
mov eax, edx
mov dword [ebp - 0x34], eax
cmp dword [ecx + 0x1110], 0
je 0x1005c511
cmp dword [ecx + 0x1114], 0
je 0x1005c53b
test eax, eax
jl 0x1005c546
jg 0x1005c51c
cmp ebx, 0xffffffff
jb 0x1005c53b
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test eax, eax
jg 0x1005c57c
jl 0x1005c546
cmp ebx, 0x16
jae 0x1005c565
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0xb
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test eax, eax
jg 0x1005c57c
jl 0x1005c573
cmp ebx, 0x1002b
jae 0x1005c57c
mov ecx, ebx
mov dword [ebp - 0x20], eax
mov edx, eax
jmp 0x1005c586
xor edx, edx
mov ecx, 0x1002b
mov dword [ebp - 0x20], edx
mov esi, ebx
mov dword [ebp - 0x10], ecx
sub esi, ecx
mov ecx, dword [ebp - 0x14]
sbb eax, edx
xor edx, edx
push eax
push esi
mov dword [ebp - 0x38], eax
call fcn.1006dde0
add esp, 8
cmp eax, esi
jne 0x1005c5e6
cmp edx, dword [ebp - 0x38]
jne 0x1005c5e6
push dword [ebp - 0x10]
call fcn.1008680d
mov esi, eax
add esp, 4
mov dword [ebp - 0x18], esi
test esi, esi
je 0x1005c5df
push 0
lea eax, [ebp - 0x3c]
push eax
push dword [ebp - 0x10]
push esi
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1005c5e8
mov eax, dword [ebp - 0x10]
cmp dword [ebp - 0x3c], eax
je 0x1005c5ed
jmp 0x1005c5e8
mov edi, 4
jmp 0x1005c5ed
xor esi, esi
mov edi, 0xb
xor eax, eax
mov ecx, 0x12
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x1c], eax
cmp ebx, 0x16
jne 0x1005c60c
cmp dword [ebp - 0x34], eax
jne 0x1005c60c
mov ecx, ebx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x24], ecx
mov edx, dword [ebp - 0x10]
mov ebx, dword [ebp - 0x20]
sub edx, ecx
mov dword [ebp - 0x28], edx
sbb ebx, eax
mov dword [ebp - 0x38], 3
xor eax, eax
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x34], eax
jmp 0x1005c633
mov esi, dword [ebp - 0x18]
test edi, edi
jne 0x1005c72e
test ebx, ebx
jl 0x1005c72e
jg 0x1005c64d
test edx, edx
jb 0x1005c72e
mov eax, dword [ebp - 0x20]
cmp dword [ebp - 0x1c], eax
jg 0x1005c72e
jl 0x1005c664
cmp ecx, dword [ebp - 0x10]
ja 0x1005c72e
mov cl, byte [edx + esi]
mov eax, edx
add eax, 1
mov edx, ebx
adc edx, 0
mov bl, byte [eax + esi]
add eax, 1
mov esi, 0x12
adc edx, 0
sub esi, dword [ebp - 0x38]
mov dword [ebp - 0x30], edx
mov edx, dword [ebp - 0x18]
mov dl, byte [eax + edx]
add eax, 1
adc dword [ebp - 0x30], 0
cmp cl, 0x50
jne 0x1005c6c8
cmp bl, 0x4b
jne 0x1005c6c8
cmp dl, 5
jne 0x1005c6c8
mov ecx, dword [ebp - 0x18]
cmp byte [eax + ecx], 6
jne 0x1005c6c8
cmp byte [eax + ecx + 1], 0
jne 0x1005c6bc
cmp byte [eax + ecx + 2], 0
jne 0x1005c6bc
xor edi, edi
jmp 0x1005c6c1
mov edi, 0x15
mov dword [ebp - 0x34], 1
dec esi
mov cl, bl
mov bl, dl
test esi, esi
jg 0x1005c685
mov eax, dword [ebp - 0x34]
test eax, eax
jne 0x1005c6e9
cmp dword [ebp - 0x2c], eax
jg 0x1005c6e9
jl 0x1005c6e4
cmp dword [ebp - 0x28], eax
ja 0x1005c6e9
mov edi, 0xb
mov ecx, dword [ebp - 0x24]
mov esi, dword [ebp - 0x1c]
add ecx, 0x12
mov edx, dword [ebp - 0x10]
mov ebx, dword [ebp - 0x20]
adc esi, 0
sub edx, ecx
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x1c], esi
sbb ebx, esi
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x38], 0
test ebx, ebx
jg 0x1005c726
jl 0x1005c71c
test edx, edx
jae 0x1005c726
xor edx, edx
xor ebx, ebx
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x2c], ebx
test eax, eax
je 0x1005c630
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp edi, 0xb
jne 0x1005c741
mov edi, 0x15
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x1005c7a6
push eax
call fcn.10086818
add esp, 4
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
sub eax, 2
je 0x1005c78c
sub eax, 1
je 0x1005c78c
mov edi, 0x12
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor edi, edi
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, 0xd
mov ecx, dword [ebp - 0xc]
mov eax, edi
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret