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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x110
push ebx
push esi
push edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
lea eax, [ebp - 0x110]
push str.SYSTEMCurrentControlSetServices_
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea ecx, [ebp - 0x110]
push str.Distribusjl
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea edx, [ebp - 8]
lea eax, [ebp - 0x110]
push edx
push 0xf003f
push 0
push eax
push 0x80000002
call dword [0x408d98]
test eax, eax
je 0x402495
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ecx, 0x41
xor eax, eax
lea edi, [ebp - 0x110]
lea edx, [ebp - 0x110]
rep stosd dword es:[edi], eax
lea ecx, [ebp - 0xc]
mov dword [ebp - 0xc], 0x104
push ecx
push edx
push eax
push eax
mov eax, dword [ebp - 8]
push str.ImagePath
push eax
call dword [0x408d94]
test eax, eax
je 0x4024e9
mov ecx, dword [ebp - 8]
push ecx
call dword [0x408d90]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 8]
push edx
call dword [0x408d90]
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40250e
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push 0
push 3
push 0
push 1
lea ecx, [ebp - 0x110]
push 0x80000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40253a
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
test eax, eax
mov dword [ebp - 4], eax
jne 0x40255a
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebx, eax
test ebx, ebx
jne 0x402579
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [ebp - 4]
lea edx, [ebp - 4]
push 0
push edx
push eax
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4025b1
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp + 8]
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_BeginUpdateResourceA]
mov esi, eax
test esi, esi
jne 0x4025da
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 4]
push edx
push ebx
push 0
push 0x66
push 0xa
push esi
call dword [sym.imp.KERNEL32.dll_UpdateResourceA]
mov edi, eax
test edi, edi
je 0x402613
push str.Distribusjl
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
push eax
push str.Distribusjl
push 0
push 0x65
push 0xa
push esi
call dword [sym.imp.KERNEL32.dll_UpdateResourceA]
mov edi, eax
push 0
push esi
call dword [sym.imp.KERNEL32.dll_EndUpdateResourceA]
test eax, eax
push ebx
jne 0x402630
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret