Function at 0x401d10
Capabilities:
Terminate process
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41283c
mov eax, dword fs:[0]
push eax
mov eax, 0x229c
call fcn.00411770
mov eax, dword [0x41a3b0]
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 eax, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x22a4], ebx
cmp dword [eax + 0x14], 8
jb 0x401d56
mov eax, dword [eax]
push eax
call fcn.0040ae60
push ebx
mov edi, eax
call fcn.00405dd0
add esp, 8
test eax, eax
jne 0x401d72
xor al, al
jmp 0x401fe4
test edi, edi
je 0x401fe2
lea eax, [ebp - 0x2218]
push eax
push edi
call fcn.0040af90
add esp, 8
test eax, eax
jne 0x401fd9
xor ebx, ebx
cmp dword [ebp - 0x2218], ebx
jbe 0x401fd9
push 0
push 0
push 0
push 0
push 0x200
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0x2298]
push eax
push edi
call fcn.0040b540
add esp, 0x20
test eax, eax
jne 0x401fb3
lea esi, [ebp - 0x210]
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x401dd5
lea eax, [ebp - 0x210]
sub esi, ecx
push eax
lea ecx, [ebp - 0x22a0]
call fcn.004010f0
lea eax, [ebp - 0x22a0]
mov dword [ebp - 4], 0
push eax
lea eax, [ebp - 0x22a8]
push eax
call fcn.00401bf0
add esp, 8
push dword [eax]
lea ecx, [ebp - 0x2248]
mov byte [ebp - 4], 1
call fcn.00401220
mov edx, dword [ebp - 0x22a8]
or ecx, 0xffffffff
add edx, 0xfffffff0
mov byte [ebp - 4], 3
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x401e42
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x22a0]
or ecx, 0xffffffff
add edx, 0xfffffff0
mov byte [ebp - 4], 4
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x401e66
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [ebp - 0x2248]
push eax
push dword [ebp - 0x22a4]
lea eax, [ebp - 0x2230]
push eax
call fcn.00405370
add esp, 0xc
cmp byte [ebp + esi - 0x211], 0x2f
mov byte [ebp - 4], 5
jne 0x401ea1
lea eax, [ebp - 0x2230]
push eax
call fcn.00405dd0
jmp 0x401f41
push edi
call fcn.0040b640
add esp, 4
test eax, eax
jne 0x401f44
cmp dword [ebp - 0x221c], 8
mov dword [ebp - 0x229c], eax
lea eax, [ebp - 0x2230]
cmovae eax, dword [ebp - 0x2230]
push 0x4143c4
push eax
lea eax, [ebp - 0x229c]
push eax
call dword [sym.imp.MSVCR120.dll__wfopen_s]
add esp, 0xc
cmp dword [ebp - 0x229c], 0
je 0x401f3b
jmp 0x401ef0
push 0x2000
lea eax, [ebp - 0x2210]
push eax
push edi
call fcn.0040b9c0
mov esi, eax
add esp, 0xc
test esi, esi
jle 0x401f26
push dword [ebp - 0x229c]
lea eax, [ebp - 0x2210]
push 1
push esi
push eax
call dword [sym.imp.MSVCR120.dll_fwrite]
add esp, 0x10
jmp 0x401f28
js 0x401f2c
test esi, esi
jg 0x401ef0
push dword [ebp - 0x229c]
call dword [sym.imp.MSVCR120.dll_fclose]
add esp, 4
push edi
call fcn.0040b920
add esp, 4
cmp dword [ebp - 0x221c], 8
jb 0x401f5b
push dword [ebp - 0x2230]
call sub.MSVCR120.dll_void___cdecl_operator_delete_void__
add esp, 4
xor eax, eax
mov dword [ebp - 0x221c], 7
cmp dword [ebp - 0x2234], 8
mov dword [ebp - 0x2220], 0
mov word [ebp - 0x2230], ax
mov dword [ebp - 4], 0xffffffff
jb 0x401f96
push dword [ebp - 0x2248]
call sub.MSVCR120.dll_void___cdecl_operator_delete_void__
add esp, 4
xor eax, eax
mov dword [ebp - 0x2234], 7
mov dword [ebp - 0x2238], 0
mov word [ebp - 0x2248], ax
mov eax, dword [ebp - 0x2218]
inc ebx
cmp ebx, eax
jae 0x401fd9
push edi
call fcn.0040b0d0
add esp, 4
test eax, eax
jne 0x401fd9
mov eax, dword [ebp - 0x2218]
cmp ebx, eax
jb 0x401da0
push edi
call fcn.0040af50
add esp, 4
mov al, 1
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.00411746
mov esp, ebp
pop ebp
ret