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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42fd07
mov eax, dword fs:[0]
push eax
sub esp, 0x18c
mov eax, dword [0x43fa8c]
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
mov esi, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
xor ebx, ebx
cmp esi, ebx
je 0x412a38
cmp eax, ebx
je 0x412a38
push eax
lea ecx, [ebp - 0x174]
call fcn.0040ded0
push esi
lea ecx, [ebp - 0x178]
mov dword [ebp - 4], ebx
call fcn.00411d40
mov eax, dword [ebp - 0x174]
cmp dword [eax - 0xc], ebx
mov eax, dword [ebp - 0x178]
mov byte [ebp - 4], 1
je 0x4129ef
cmp dword [eax - 0xc], ebx
je 0x4129ef
push 0x4c
lea ecx, [ebp - 0x160]
push ebx
push ecx
mov dword [ebp - 0x168], ebx
mov dword [ebp - 0x18c], ebx
mov dword [ebp - 0x188], ebx
mov dword [ebp - 0x164], ebx
call fcn.0041d4a0
mov edx, dword [0x440ce0]
mov eax, dword [edx + 0xc]
add esp, 0xc
mov ecx, 0x440ce0
call eax
add eax, 0x10
mov dword [ebp - 0x16c], eax
mov ecx, dword [ebp - 0x178]
push ecx
mov byte [ebp - 4], 2
call fcn.00405350
mov edi, eax
add esp, 4
cmp edi, ebx
jne 0x41269e
mov dword [ebp - 0x168], 0x6e
jmp 0x412964
lea edx, [ebp - 0x18c]
push edx
push edi
call fcn.004040e0
add esp, 8
cmp eax, ebx
je 0x4126c1
mov dword [ebp - 0x168], 0x3ee
jmp 0x412951
mov eax, dword [ebp - 0x18c]
mov esi, eax
mov dword [ebp - 0x184], esi
cmp eax, ebx
jne 0x4126e2
mov dword [ebp - 0x168], 0x3ee
jmp 0x412951
push edi
call fcn.00404740
push 0x103
lea eax, [ebp - 0x113]
push ebx
push eax
mov byte [ebp - 0x114], 0
call fcn.0041d4a0
push 0x100000
call fcn.0041f621
add esp, 0x14
mov dword [ebp - 0x17c], eax
mov dword [ebp - 0x180], ebx
cmp esi, ebx
jbe 0x41293c
push 0
push 0
push 0
push 0
push 0x104
lea ecx, [ebp - 0x114]
push ecx
lea edx, [ebp - 0x164]
push edx
push edi
call fcn.00404680
add esp, 0x20
test eax, eax
jne 0x41290f
lea ecx, [ebp - 0x16c]
call fcn.004077a0
lea eax, [ebp - 0x114]
push eax
lea ecx, [ebp - 0x198]
call fcn.00411ac0
mov ecx, dword [eax]
mov edx, dword [ebp - 0x174]
push ecx
push edx
lea eax, [ebp - 0x16c]
push str._s_s
push eax
mov byte [ebp - 4], 3
call fcn.00411500
add esp, 0x10
lea ecx, [ebp - 0x198]
mov byte [ebp - 4], 2
call fcn.0040fb80
push 0x5c
push 0x2f
lea ecx, [ebp - 0x16c]
call fcn.00410fb0
lea ecx, [ebp - 0x16c]
push ecx
lea edx, [ebp - 0x194]
push edx
call fcn.00411660
mov eax, dword [eax]
add esp, 8
cmp dword [eax - 0xc], 0
lea ecx, [ebp - 0x194]
sete bl
call fcn.0040fb80
test bl, bl
je 0x4127ed
mov ecx, dword [ebp - 0x16c]
push ecx
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
jmp 0x4128e3
lea edx, [ebp - 0x16c]
push edx
lea eax, [ebp - 0x170]
push eax
call fcn.00410ad0
add esp, 8
push 0x5c
lea ecx, [ebp - 0x170]
mov byte [ebp - 4], 4
call fcn.00411910
mov esi, dword [ebp - 0x170]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x41282d
push esi
push eax
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
push edi
call fcn.004055e0
add esp, 4
test eax, eax
jne 0x41291b
mov ecx, dword [ebp - 0x16c]
push eax
push 0x80
push 2
push eax
push eax
push 0x40000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x412927
jmp 0x412870
mov ebx, dword [ebp - 0x17c]
push 0x100000
push ebx
push edi
call fcn.00404ac0
add esp, 0xc
test eax, eax
js 0x412903
jle 0x4128b5
push 0
lea edx, [ebp - 0x190]
push edx
push eax
push ebx
push esi
mov dword [ebp - 0x190], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x412870
mov dword [ebp - 0x168], 0x1d
push edi
call fcn.00404d50
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x168], 0
lea ecx, [ebp - 0x170]
jne 0x412937
mov byte [ebp - 4], 2
call fcn.0040fb80
mov esi, dword [ebp - 0x184]
push edi
call fcn.004047b0
mov eax, dword [ebp - 0x180]
inc eax
add esp, 4
mov dword [ebp - 0x180], eax
cmp eax, esi
jb 0x412722
jmp 0x41293c
mov dword [ebp - 0x168], 0x1e
jmp 0x4128b5
mov dword [ebp - 0x168], 0x1e
jmp 0x41293c
mov dword [ebp - 0x168], 0x1e
jmp 0x412931
mov dword [ebp - 0x168], 0x1d
lea ecx, [ebp - 0x170]
call fcn.0040fb80
mov eax, dword [ebp - 0x17c]
xor ebx, ebx
cmp eax, ebx
je 0x412951
push eax
call fcn.0041eb09
add esp, 4
push edi
call fcn.00405370
mov esi, dword [ebp - 0x168]
add esp, 4
cmp esi, ebx
jle 0x412976
mov esi, dword [ebp - 0x168]
and esi, 0xffff
or esi, 0x80070000
mov eax, dword [ebp - 0x16c]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41299c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x178]
add eax, 0xfffffff0
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4129c2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x174]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4129eb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
jmp 0x412a3d
add eax, 0xfffffff0
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x412a0f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x174]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x412a38
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 0x80070057
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.0041d48e
mov esp, ebp
pop ebp
ret