Function at 0x410400
Capabilities:
Check if file exists
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x41c
mov eax, dword [0x5f3008]
xor eax, ebp
mov dword [ebp - 4], eax
push edi
push ecx
mov edi, edx
lea eax, [ebp - 0x404]
push 0x200
push eax
mov dword [edi], 0
call fcn.00565fee
add esp, 0xc
lea eax, [ebp - 0x404]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp eax, 5
jge 0x410457
mov eax, 0x1b5d
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0056060a
mov esp, ebp
pop ebp
ret
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0x62
push esi
mov dword [ebp + eax*2 - 0x40a], 0x79006b
xor esi, esi
mov word [ebp + eax*2 - 0x406], cx
nop dword [eax]
push 0
push 0x8000000
push 3
push 0
push 3
push SysReAllocString
lea eax, [ebp - 0x404]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x418], eax
cmp eax, 0xffffffff
jne 0x4104f1
call ebx
mov dword [edi], eax
cmp eax, 2
je 0x4104d9
push 0x14
call dword [sym.imp.KERNEL32.dll_Sleep]
inc esi
cmp esi, 3
jl 0x410480
mov ebx, 0x1b5e
pop esi
mov eax, ebx
pop ebx
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0056060a
mov esp, ebp
pop ebp
ret
mov ebx, 1
pop esi
mov eax, ebx
pop ebx
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0056060a
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x40c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 4
jae 0x410517
cmp dword [ebp - 0x40c], 0
jne 0x410517
mov ebx, 2
jmp 0x4108f7
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp - 0x408]
push 0
push eax
push 4
push 0x5f64bc
push dword [ebp - 0x418]
call esi
test eax, eax
jne 0x410547
call ebx
mov dword [edi], eax
mov ebx, 0x1b5f
jmp 0x4108f7
mov ecx, dword [0x5f64bc]
test ecx, ecx
jne 0x410559
lea ebx, [ecx + 3]
jmp 0x4108f7
jns 0x4105ef
push 0
lea eax, [ebp - 0x408]
push eax
push 4
push 0x5f64c8
push dword [ebp - 0x418]
call esi
test eax, eax
jne 0x410589
call ebx
mov dword [edi], eax
mov ebx, 0x1b65
jmp 0x4108f7
cmp dword [ebp - 0x408], 4
je 0x4105a2
mov dword [edi], 0
mov ebx, 0x1b66
jmp 0x4108f7
push 0
lea eax, [ebp - 0x408]
push eax
push 4
push 0x5f64bc
push dword [ebp - 0x418]
call esi
test eax, eax
jne 0x4105cc
call ebx
mov dword [edi], eax
mov ebx, 0x1b67
jmp 0x4108f7
cmp dword [ebp - 0x408], 4
je 0x4105e5
mov dword [edi], 0
mov ebx, 0x1b68
jmp 0x4108f7
mov ecx, dword [0x5f64bc]
xor eax, eax
jmp 0x4105fe
mov dword [0x5f64c8], 0xf9062
mov eax, 2
movzx eax, ax
mov dword [ebp - 0x414], eax
mov eax, dword [0x5f64c0]
mov dword [ebp - 0x41c], eax
test eax, eax
je 0x41063e
push eax
call fcn.00560853
mov eax, dword [0x5f64c0]
add esp, 4
cmp dword [ebp - 0x41c], 0
mov ecx, 0x8123
cmovne eax, ecx
mov ecx, dword [0x5f64bc]
mov dword [0x5f64c0], eax
mov eax, dword [ebp - 0x414]
mov edx, 6
movzx eax, ax
add eax, ecx
xor ecx, ecx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00560858
add esp, 4
mov ecx, eax
lea eax, [ebp - 0x408]
mov dword [0x5f64c0], ecx
push 0
push eax
mov eax, dword [0x5f64bc]
lea eax, [eax + eax*2]
add eax, eax
push eax
push ecx
push dword [ebp - 0x418]
call esi
test eax, eax
jne 0x410699
call ebx
mov dword [edi], eax
mov ebx, 0x1b60
jmp 0x4108f7
mov ebx, dword [0x5f64c0]
xor ecx, ecx
mov dword [ebp - 0x410], ecx
cmp word [ebp - 0x414], cx
je 0x41081f
mov edx, dword [0x5f64bc]
xor esi, esi
test edx, edx
jle 0x410709
lea edi, [ebx + 4]
mov eax, edi
nop word [eax + eax]
mov ecx, 0x9d20
cmp word [eax], cx
mov ecx, 0
je 0x410742
inc esi
add eax, 6
cmp esi, edx
jl 0x4106d0
test edx, edx
jle 0x410709
lea eax, [edx + edx*2]
lea ecx, [ebx + eax*2]
mov eax, dword [ecx - 6]
lea ecx, [ecx - 6]
mov dword [ecx + 6], eax
dec edx
mov ax, word [ecx + 4]
mov word [ecx + 0xa], ax
test edx, edx
jg 0x4106f1
xor ecx, ecx
lea edi, [ebx + 4]
mov byte [ebx], 1
mov esi, 0x9d20
mov eax, 1
mov word [edi], si
mov word [ebx + 2], ax
mov edx, dword [0x5f64bc]
xor eax, eax
inc edx
mov dword [0x5f64bc], edx
test edx, edx
jle 0x41078c
cmp word [edi], si
jne 0x410784
inc eax
add edi, 6
cmp eax, edx
jl 0x410733
jmp 0x41078c
cmp edx, esi
jle 0x41076e
lea eax, [edx + edx*2]
sub edx, esi
lea ebx, [ebx + eax*2]
nop
mov eax, dword [ebx - 6]
lea ebx, [ebx - 6]
mov dword [ebx + 6], eax
mov ax, word [ebx + 4]
mov word [ebx + 0xa], ax
sub edx, 1
jne 0x410750
mov ebx, dword [0x5f64c0]
xor ecx, ecx
lea eax, [esi + esi*2]
mov esi, 0x9d20
mov dword [ebx + eax*2 + 2], 0x9d200001
mov byte [ebx + eax*2], 1
jmp 0x410720
mov ecx, eax
mov dword [ebp - 0x410], eax
mov esi, ecx
mov edi, 0x9d21
cmp edx, ecx
jle 0x4107dc
lea eax, [ecx + 1]
lea eax, [ecx + eax*2]
lea eax, [ebx + eax*2]
cmp word [eax], di
je 0x4107f8
inc esi
add eax, 6
cmp esi, edx
jl 0x4107a0
cmp edx, ecx
jle 0x4107dc
lea eax, [edx + edx*2]
sub edx, ecx
lea esi, [ebx + eax*2]
nop dword [eax]
mov eax, dword [esi - 6]
lea esi, [esi - 6]
mov dword [esi + 6], eax
mov ax, word [esi + 4]
mov word [esi + 0xa], ax
sub edx, 1
jne 0x4107c0
mov ecx, dword [ebp - 0x410]
lea eax, [ecx + ecx*2]
mov byte [ebx + eax*2], 1
mov dword [ebx + eax*2 + 2], 0x9d210002
mov eax, dword [0x5f64bc]
inc eax
mov dword [0x5f64bc], eax
jmp 0x410824
cmp edx, esi
jle 0x41081a
lea eax, [edx + edx*2]
sub edx, esi
lea edi, [ebx + eax*2]
mov eax, dword [edi - 6]
lea edi, [edi - 6]
mov dword [edi + 6], eax
mov ax, word [edi + 4]
mov word [edi + 0xa], ax
sub edx, 1
jne 0x410804
lea eax, [esi + esi*2]
jmp 0x4107df
mov eax, dword [0x5f64bc]
mov esi, dword [0x5f64c4]
push eax
push ebx
call dword [sym.imp.USER32.dll_CreateAcceleratorTableW]
mov dword [0x5f64c4], eax
test esi, esi
je 0x410842
push esi
call dword [sym.imp.USER32.dll_DestroyAcceleratorTable]
mov ecx, dword [0x5f64c0]
mov edx, 0x5f3a8a
xor edi, edi
mov dword [ebp - 0x414], ecx
mov dword [ebp - 0x41c], edx
lea eax, [ecx + 4]
mov dword [ebp - 0x410], eax
lea ebx, [edx + 6]
mov eax, edx
mov ecx, ebx
mov esi, 5
xor edx, edx
mov byte [eax], 0
mov word [ecx], dx
lea ecx, [ecx + 2]
lea eax, [eax + 1]
sub esi, 1
jne 0x410870
mov edx, dword [ebp - 0x41c]
mov ecx, dword [ebp - 0x410]
mov ax, word [edx + 0x10]
cmp ax, word [ecx]
jne 0x4108e0
mov esi, dword [ebp - 0x414]
mov ecx, edx
movzx eax, word [esi + 2]
lea ebx, [ebx + 2]
mov word [ebx - 2], ax
lea ecx, [ecx + 1]
mov al, byte [esi]
inc edi
mov esi, dword [0x5f64c0]
mov byte [ecx - 1], al
lea eax, [edi + edi*2]
lea esi, [esi + eax*2]
lea eax, [esi + 4]
mov dword [ebp - 0x414], esi
mov dword [ebp - 0x410], eax
mov esi, eax
movzx eax, word [edx + 0x10]
cmp ax, word [esi]
mov esi, dword [ebp - 0x414]
je 0x4108a0
add edx, 0x18
mov dword [ebp - 0x41c], edx
cmp edx, 0x5f4492
jl 0x410864
xor ebx, ebx
push dword [ebp - 0x418]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
mov eax, ebx
pop esi
pop ebx
xor ecx, ebp
pop edi
call fcn.0056060a
mov esp, ebp
pop ebp
ret