Function at 0x4157f0
Capabilities:
Check if file exists
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x56f7c6
mov eax, dword fs:[0]
push eax
sub esp, 0x7c
mov eax, dword [0x5d2fec]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0
mov dword [ebp - 4], 8
call fcn.00557010
add esp, 4
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x24]
mov dword [ebp - 0x34], edx
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x24], 0
push str._Y_m_d
push eax
call fcn.004173f0
push 0x5b2524
lea eax, [ebp - 0x2c]
mov byte [ebp - 4], 9
push eax
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x2c], 0
call fcn.004173f0
mov byte [ebp - 4], 0xa
call fcn.00417ce3
mov ecx, eax
test ecx, ecx
jne 0x41587f
push 0x80004005
call fcn.00407010
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x1c], esi
mov byte [ebp - 4], 0xb
call fcn.00417ce3
mov ecx, eax
test ecx, ecx
jne 0x4158a3
push 0x80004005
call fcn.00407010
mov eax, dword [ecx]
call dword [eax + 0xc]
lea edi, [eax + 0x10]
mov dword [ebp - 0x18], edi
mov byte [ebp - 4], 0xc
mov ecx, 1
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x105
or eax, ecx
jge 0x4158d6
push 0x105
lea ecx, [ebp - 0x1c]
call fcn.00406e60
mov esi, dword [ebp - 0x1c]
cmp dword [esi - 8], 0x105
jge 0x4158e9
push 0x80070057
call fcn.00407010
push 0x105
xor eax, eax
mov dword [esi - 0xc], 0x105
push esi
push eax
mov word [esi + 0x20a], ax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0x5c
push esi
call fcn.005512e5
add esp, 8
test eax, eax
jne 0x41591a
or eax, 0xffffffff
jmp 0x41591e
sub eax, esi
sar eax, 1
inc eax
lea ecx, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x44]
push eax
call fcn.00405b70
mov byte [ebp - 4], 0xd
lea ecx, [edi - 0x10]
mov edx, dword [eax]
or ebx, 0xffffffff
mov dword [ebp - 0x40], ecx
lea eax, [edx - 0x10]
mov dword [ebp - 0x3c], eax
cmp eax, ecx
je 0x415992
cmp dword [ecx + 0xc], 0
lea edi, [ecx + 0xc]
jl 0x415983
mov eax, dword [eax]
cmp eax, dword [ecx]
jne 0x415983
push dword [ebp - 0x3c]
call fcn.00406c80
add esp, 4
mov dword [ebp - 0x3c], eax
mov ecx, ebx
lock xadd dword [edi], ecx
dec ecx
test ecx, ecx
jg 0x41597b
mov edi, dword [ebp - 0x40]
push edi
mov ecx, dword [edi]
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x3c]
lea edi, [eax + 0x10]
mov dword [ebp - 0x18], edi
jmp 0x415992
push dword [edx - 0xc]
lea ecx, [ebp - 0x18]
push edx
call fcn.00406bd0
mov edi, dword [ebp - 0x18]
mov byte [ebp - 4], 0xc
mov eax, ebx
mov edx, dword [ebp - 0x44]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4159b0
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [ebp - 0x24]
mov dword [ebp - 0x14], 0
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x44]
push eax
call fcn.00405ab0
push str._SoftCn.log
push eax
lea eax, [ebp - 0x14]
mov byte [ebp - 4], 0xe
push eax
call fcn.00406a20
add esp, 0x18
mov byte [ebp - 4], 0x10
mov eax, ebx
mov edx, dword [ebp - 0x44]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4159fc
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0x5b2590
lea eax, [ebp + 0xc]
mov dword [ebp - 0x20], 0
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.00406a20
lea ecx, [ebp + 8]
mov byte [ebp - 4], 0x11
push ecx
push eax
lea eax, [ebp - 0x48]
push eax
call fcn.00405ab0
push 0x5afd58
push eax
lea eax, [ebp - 0x88]
mov byte [ebp - 4], 0x12
push eax
call fcn.00406a20
lea ecx, [ebp + 0x28]
mov byte [ebp - 4], 0x13
push ecx
push eax
lea eax, [ebp - 0x84]
push eax
call fcn.00405ab0
push 0x5afd40
push eax
lea eax, [ebp - 0x80]
mov byte [ebp - 4], 0x14
push eax
call fcn.00406a20
push 0x5b2580
push eax
lea eax, [ebp - 0x7c]
mov byte [ebp - 4], 0x15
push eax
call fcn.00406a20
add esp, 0x48
lea ecx, [ebp + 0x18]
mov byte [ebp - 4], 0x16
push ecx
push eax
lea eax, [ebp - 0x78]
push eax
call fcn.00405ab0
push 0x5afd40
push eax
lea eax, [ebp - 0x74]
mov byte [ebp - 4], 0x17
push eax
call fcn.00406a20
push 0x5b2570
push eax
lea eax, [ebp - 0x70]
mov byte [ebp - 4], 0x18
push eax
call fcn.00406a20
lea ecx, [ebp + 0x10]
mov byte [ebp - 4], 0x19
push ecx
push eax
lea eax, [ebp - 0x6c]
push eax
call fcn.00405ab0
push 0x5afd40
push eax
lea eax, [ebp - 0x68]
mov byte [ebp - 4], 0x1a
push eax
call fcn.00406a20
push 0x5b2560
push eax
lea eax, [ebp - 0x64]
mov byte [ebp - 4], 0x1b
push eax
call fcn.00406a20
add esp, 0x48
lea ecx, [ebp + 0x14]
mov byte [ebp - 4], 0x1c
push ecx
push eax
lea eax, [ebp - 0x60]
push eax
call fcn.00405ab0
push 0x5afd40
push eax
lea eax, [ebp - 0x5c]
mov byte [ebp - 4], 0x1d
push eax
call fcn.00406a20
push 0x5b2554
push eax
lea eax, [ebp - 0x58]
mov byte [ebp - 4], 0x1e
push eax
call fcn.00406a20
lea ecx, [ebp + 0x1c]
mov byte [ebp - 4], 0x1f
push ecx
push eax
lea eax, [ebp - 0x54]
push eax
call fcn.00405ab0
push 0x5b2550
push eax
lea eax, [ebp - 0x50]
mov byte [ebp - 4], 0x20
push eax
call fcn.00406a20
lea ecx, [ebp + 0x20]
mov byte [ebp - 4], 0x21
push ecx
push eax
lea eax, [ebp - 0x4c]
push eax
call fcn.00405ab0
add esp, 0x48
push 0x5b2550
push eax
lea eax, [ebp - 0x3c]
mov byte [ebp - 4], 0x22
push eax
call fcn.00406a20
lea ecx, [ebp + 0x24]
mov byte [ebp - 4], 0x23
push ecx
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.00405ab0
push str._r_n_r_n
push eax
lea eax, [ebp - 0x20]
mov byte [ebp - 4], 0x24
push eax
call fcn.00406a20
mov byte [ebp - 4], 0x23
add esp, 0x24
mov edx, dword [ebp - 0x40]
add edx, 0xfffffff0
mov eax, ebx
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x415bb9
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x22
mov eax, ebx
mov edx, dword [ebp - 0x3c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x415bd7
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x21
mov eax, ebx
mov edx, dword [ebp - 0x4c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x415bf5
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x20
mov eax, ebx
mov edx, dword [ebp - 0x50]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x415c13
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x1f
mov eax, ebx
mov edx, dword [ebp - 0x54]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x415c31
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x1e
mov eax, ebx
mov edx, dword [ebp - 0x58]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x415c4f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x1d
mov eax, ebx
mov edx, dword [ebp - 0x5c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x415c6d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x1c
mov eax, ebx
mov edx, dword [ebp - 0x60]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x415c8b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x1b
mov eax, ebx
mov edx, dword [ebp - 0x64]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x415ca9
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x1a
mov eax, ebx
mov edx, dword [ebp - 0x68]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x415cc7
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x19
mov eax, ebx
mov edx, dword [ebp - 0x6c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x415ce5
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x18
mov eax, ebx
mov edx, dword [ebp - 0x70]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x415d03
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x17
mov eax, ebx
mov edx, dword [ebp - 0x74]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x415d21
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x16
mov eax, ebx
mov edx, dword [ebp - 0x78]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x415d3f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x15
mov eax, ebx
mov edx, dword [ebp - 0x7c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x415d5d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x14
mov eax, ebx
mov edx, dword [ebp - 0x80]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x415d7b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x13
mov eax, ebx
mov edx, dword [ebp - 0x84]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x415d9c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x12
mov eax, ebx
mov edx, dword [ebp - 0x88]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x415dbd
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x11
mov eax, ebx
mov edx, dword [ebp - 0x48]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x415ddb
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x10
mov eax, ebx
mov edx, dword [ebp - 0x28]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x415df9
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp - 0x14]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
mov eax, dword [sym.imp.KERNEL32.dll_CreateFileW]
jne 0x415e52
push 0
push 0x80
push 1
push 0
push 0
push 0x40000000
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x48], eax
cmp eax, 0xffffffff
je 0x415e4d
push 0
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x28], 0xfeff
push ecx
push 2
lea ecx, [ebp - 0x28]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x48]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [sym.imp.KERNEL32.dll_CreateFileW]
push 0
push 0x80
push 3
push 0
push 0
push 0x40000000
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x3c], eax
cmp eax, 0xffffffff
je 0x415ea0
push 2
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [ebp - 0x20]
lea edx, [ebp - 0x30]
push 0
push edx
mov eax, dword [ecx - 0xc]
add eax, eax
push eax
push ecx
push dword [ebp - 0x3c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x3c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x20]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x415eba
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0xc
mov eax, ebx
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x415ed8
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0xb
add edi, 0xfffffff0
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x415ef3
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0xa
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x415f0e
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 9
mov eax, ebx
mov edx, dword [ebp - 0x2c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x415f2c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 8
mov eax, ebx
mov edx, dword [ebp - 0x24]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x415f4a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 7
mov eax, ebx
mov edx, dword [ebp + 8]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x415f68
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 6
mov eax, ebx
mov edx, dword [ebp + 0xc]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x415f86
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 5
mov eax, ebx
mov edx, dword [ebp + 0x10]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x415fa4
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 4
mov eax, ebx
mov edx, dword [ebp + 0x14]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x415fc2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 3
mov eax, ebx
mov edx, dword [ebp + 0x18]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x415fe0
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 2
mov eax, ebx
mov edx, dword [ebp + 0x1c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x415ffe
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 1
mov eax, ebx
mov edx, dword [ebp + 0x20]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x41601c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov eax, ebx
mov edx, dword [ebp + 0x24]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x41603a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp + 0x28]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x416059
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0054e73a
mov esp, ebp
pop ebp
ret