Function at 0x40dbd0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41c178
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x425024]
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, ecx
mov ebx, dword [ebp + 8]
cmp ebx, 0xffffffff
sete al
test al, al
je 0x40dc17
xor eax, eax
cmp ebx, 0xffffffff
cmovne eax, ebx
jmp 0x40dde7
mov eax, dword [esi + 0x20]
mov ecx, dword [eax]
test ecx, ecx
je 0x40dc44
mov edx, dword [esi + 0x30]
mov edi, dword [edx]
lea eax, [edi + ecx]
cmp ecx, eax
jae 0x40dc44
lea eax, [edi - 1]
mov dword [edx], eax
mov ecx, dword [esi + 0x20]
mov edx, dword [ecx]
lea eax, [edx + 1]
mov dword [ecx], eax
mov eax, ebx
mov byte [edx], bl
jmp 0x40dde7
cmp dword [esi + 0x4c], 0
jne 0x40dc52
or eax, 0xffffffff
jmp 0x40dde7
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x40dc70
mov edx, dword [esi + 0x54]
mov ecx, dword [esi + 0x50]
sub edx, ecx
mov dword [edi], ecx
mov eax, dword [esi + 0x1c]
mov dword [eax], ecx
mov eax, dword [esi + 0x2c]
mov dword [eax], edx
cmp dword [esi + 0x38], 0
jne 0x40dc95
push dword [esi + 0x4c]
movsx eax, bl
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
or ecx, 0xffffffff
add esp, 8
cmp eax, ecx
cmovne ecx, ebx
mov eax, ecx
jmp 0x40dde7
sub esp, 8
mov byte [ebp - 0x29], bl
lea ecx, [ebp - 0x28]
call fcn.0040d390
mov dword [ebp - 4], 0
nop word [eax + eax]
cmp dword [ebp - 0x14], 0x10
lea eax, [ebp - 0x30]
push eax
mov eax, dword [ebp - 0x18]
lea edx, [ebp - 0x28]
cmovae edx, dword [ebp - 0x28]
lea ecx, [ebp - 0x28]
cmovae ecx, dword [ebp - 0x28]
add eax, edx
push eax
push ecx
mov ecx, dword [esi + 0x38]
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x29]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet___char_const___char_const___char_const____char___char___char___const]
test eax, eax
js 0x40ddce
cmp eax, 1
jg 0x40ddaa
mov ebx, dword [ebp - 0x14]
lea eax, [ebp - 0x28]
mov ecx, dword [ebp - 0x28]
cmp ebx, 0x10
mov edi, dword [ebp - 0x30]
cmovae eax, ecx
sub edi, eax
je 0x40dd2e
push dword [esi + 0x4c]
cmp ebx, 0x10
lea eax, [ebp - 0x28]
push edi
cmovae eax, ecx
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x40ddce
lea eax, [ebp - 0x29]
mov byte [esi + 0x3d], 1
cmp dword [ebp - 0x34], eax
jne 0x40dda5
test edi, edi
jne 0x40dcb0
mov ecx, dword [ebp - 0x18]
cmp ecx, 0x20
jae 0x40ddce
or eax, 0xffffffff
sub eax, ecx
cmp eax, 8
jbe 0x40dd9a
lea edi, [ecx + 8]
push ecx
push edi
lea ecx, [ebp - 0x28]
call fcn.00403300
test al, al
je 0x40dcb0
cmp dword [ebp - 0x14], 0x10
lea ecx, [ebp - 0x28]
mov eax, dword [ebp - 0x18]
xorps xmm0, xmm0
cmovae ecx, dword [ebp - 0x28]
movq qword [ecx + eax], xmm0
lea eax, [ebp - 0x28]
cmp dword [ebp - 0x14], 0x10
mov dword [ebp - 0x18], edi
cmovae eax, dword [ebp - 0x28]
mov byte [eax + edi], 0
jmp 0x40dcb0
push str.string_too_long
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xlength_error_char_const__]
mov esi, dword [ebp + 8]
jmp 0x40ddd1
cmp eax, 3
jne 0x40ddce
push dword [esi + 0x4c]
movsx eax, byte [ebp - 0x29]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
add esp, 8
mov esi, 0xffffffff
cmp eax, 0xffffffff
cmovne esi, dword [ebp + 8]
jmp 0x40ddd1
or esi, 0xffffffff
mov ebx, dword [ebp - 0x14]
cmp ebx, 0x10
jb 0x40dde5
lea ecx, [ebx + 1]
push ecx
push dword [ebp - 0x28]
call fcn.004032b0
mov eax, esi
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.0041a772
mov esp, ebp
pop ebp
ret 4