Function at 0x4217c0
Capabilities:
Get file size
Write file on windows

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x45992b
push eax
mov dword fs:[0], esp
sub esp, 0x458
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 4]
test eax, eax
jne 0x421ad2
cmp dword [esi], 0xffffffff
jne 0x421ad2
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [esp + 0x50]
push 0x104
push eax
push 0
mov dword [esi + 4], 1
call edi
mov ecx, dword [0x468b08]
lea edx, [esp + 0x258]
push 0x104
push edx
mov eax, dword [ecx + 8]
push eax
call edi
mov edi, dword [sym.imp.MSVCRT.dll_wcsrchr]
lea eax, [esp + 0x50]
push 0x2e
push eax
call edi
add esp, 8
test eax, eax
je 0x421843
mov word [eax + 2], 0
lea ecx, [esp + 0x258]
push ebx
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
lea edx, [esp + 0xc]
mov ebx, eax
push edx
lea eax, [esp + 0x58]
push 0x104
push eax
call fcn.00421af0
test eax, eax
jl 0x421883
mov eax, dword [esp + 0xc]
mov ecx, 0x104
sub ecx, eax
push ebx
lea edx, [esp + eax*2 + 0x58]
push ecx
push edx
call fcn.0040cf30
lea eax, [esp + 0x54]
push 0x2e
push eax
call edi
add esp, 8
test eax, eax
pop ebx
je 0x42189c
add eax, 2
mov word [eax], 0
mov ecx, 0x104
lea eax, [esp + 0x50]
cmp word [eax], 0
je 0x4218b3
add eax, 2
dec ecx
jne 0x4218a5
jmp 0x4218e3
test ecx, ecx
je 0x4218e3
lea edx, [esp + 8]
test edx, edx
je 0x4218c8
mov eax, 0x104
sub eax, ecx
jmp 0x4218cc
mov eax, dword [esp + 8]
mov ecx, 0x104
push str.som.log
sub ecx, eax
lea edx, [esp + eax*2 + 0x54]
push ecx
push edx
call fcn.0040cf30
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push 0
push 0x80
push 3
push 0
push 7
lea eax, [esp + 0x64]
push 0x40000000
push eax
call edi
cmp eax, 0xffffffff
mov dword [esi], eax
je 0x421919
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0x500000
jbe 0x421968
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x421927
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push 0x80
push 2
push 0
push 3
lea ecx, [esp + 0x64]
push 0x40000000
push ecx
call edi
cmp eax, 0xffffffff
mov dword [esi], eax
je 0x421ad2
lea edx, [esp + 0xc]
push 0
push edx
lea ecx, [esp + 0x10]
push 2
push ecx
push eax
mov dword [esp + 0x1c], 0xfeff
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [esi]
push 2
push 0
push 0
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [esp + 0x40]
lea ecx, [esp + 0x48]
push eax
lea edx, [esp + 0x3c]
push ecx
lea eax, [esp + 0x14]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcessTimes]
test eax, eax
je 0x421a8d
lea ecx, [esp + 0xc]
lea edx, [esp + 0xc]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FileTimeToLocalFileTime]
lea eax, [esp + 0x14]
lea ecx, [esp + 0xc]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
mov edx, dword [0x4631a0]
push 0x87
lea ecx, [esp + 0xc]
mov dword [esp + 0xc], edx
call fcn.00405950
mov eax, dword [esp + 0x22]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x1e]
and eax, 0xffff
push eax
mov eax, dword [esp + 0x20]
and ecx, 0xffff
and edx, 0xffff
mov edi, dword [esp + 0xc]
push ecx
mov ecx, dword [esp + 0x22]
and eax, 0xffff
push edx
mov edx, dword [esp + 0x22]
push eax
mov eax, dword [esp + 0x24]
and ecx, 0xffff
and edx, 0xffff
push ecx
and eax, 0xffff
push edx
push eax
mov dword [esp + 0x484], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea ecx, [esp + 0x6c]
push eax
push ecx
push edi
push esi
call fcn.00421590
mov eax, dword [esp + 0x34]
mov ecx, dword [0x4631a4]
add esp, 0x2c
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x421ad2
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x421ad2
mov eax, dword [esp + 8]
add eax, 0xfffffff4
push eax
call fcn.0044bf22
add esp, 4
pop edi
pop esi
mov ecx, dword [esp + 0x458]
mov dword fs:[0], ecx
add esp, 0x464
ret
lea ecx, [esp + 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
mov edx, dword [esp + 0x2e]
mov eax, dword [esp + 0x2a]
mov ecx, dword [esp + 0x28]
and edx, 0xffff
and eax, 0xffff
push edx
and ecx, 0xffff
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea edx, [esp + 0x5c]
push eax
push edx
push str.Process__s__d____d__02d__02d_
push esi
call fcn.00421590
add esp, 0x1c
mov ecx, dword [esp + 0x460]
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x464
ret