Function at 0x434d40
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
mov eax, dword [0x5bc324]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
mov eax, 0xffff
push edi
mov edi, ecx
cmp ax, bx
jne 0x434d75
pop edi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00523a6a
mov esp, ebp
pop ebp
ret 4
mov eax, dword [edi + 0x20]
push esi
mov ecx, dword [eax]
test ecx, ecx
je 0x434db3
mov edx, dword [edi + 0x30]
mov esi, dword [edx]
lea eax, [ecx + esi*2]
cmp ecx, eax
jae 0x434db3
lea ecx, [esi - 1]
mov dword [edx], ecx
mov edx, dword [edi + 0x20]
mov esi, dword [edx]
lea ecx, [esi + 2]
mov dword [edx], ecx
mov word [esi], bx
pop esi
pop edi
mov ax, bx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00523a6a
mov esp, ebp
pop ebp
ret 4
cmp dword [edi + 0x4c], 0
je 0x434f50
mov esi, dword [edi + 0xc]
lea eax, [edi + 0x3c]
cmp dword [esi], eax
jne 0x434ddd
mov edx, dword [edi + 0x54]
mov ecx, dword [edi + 0x50]
sub edx, ecx
mov dword [esi], ecx
mov eax, dword [edi + 0x1c]
sar edx, 1
mov dword [eax], ecx
mov eax, dword [edi + 0x2c]
mov dword [eax], edx
mov ecx, dword [edi + 0x38]
mov dword [ebp - 0x3c], ecx
test ecx, ecx
jne 0x434e1a
push dword [edi + 0x4c]
push ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputwc]
mov ecx, 0xffff
add esp, 8
cmp ax, cx
movzx eax, bx
jne 0x434f55
pop esi
pop edi
mov eax, ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00523a6a
mov esp, ebp
pop ebp
ret 4
movzx eax, bx
lea edx, [edi + 0x40]
mov dword [ebp - 0x34], eax
mov eax, dword [ecx]
mov esi, dword [eax + 0x1c]
cmp eax, vtable.std::codecvt_wchar_t__char__struct__Mbstatet_.0
jne 0x434f68
lea ecx, [ebp - 0x34]
lea esi, [ebp - 0x2c]
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x38], esi
nop
lea eax, [ebp - 0xc]
cmp esi, eax
je 0x434ef1
mov ebx, dword [ebp - 0x3c]
sub eax, esi
add ebx, 8
push ebx
push edx
cmp eax, 5
jl 0x434e76
movzx eax, word [ecx]
push eax
push esi
call fcn.00529920
add esp, 0x10
test eax, eax
js 0x434f50
mov esi, dword [ebp - 0x38]
add esi, eax
jmp 0x434eba
mov eax, dword [edx]
mov dword [ebp - 0x40], eax
mov eax, dword [edx + 4]
mov dword [ebp - 0x44], eax
movzx eax, word [ecx]
push eax
lea eax, [ebp - 0xc]
push eax
call fcn.00529920
mov ebx, eax
add esp, 0x10
test ebx, ebx
js 0x434f50
mov esi, dword [ebp - 0x38]
lea ecx, [ebp - 0xc]
sub ecx, esi
cmp ecx, ebx
jl 0x434ee2
push ebx
lea eax, [ebp - 0xc]
push eax
push esi
call sub.VCRUNTIME140.dll_memcpy
mov esi, dword [ebp - 0x38]
add esp, 0xc
add esi, ebx
mov ecx, dword [ebp - 0x30]
lea eax, [ebp - 0x32]
add ecx, 2
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x30], ecx
lea edx, [edi + 0x40]
cmp ecx, eax
jne 0x434e40
mov ebx, dword [ebp + 8]
mov edx, eax
xor eax, eax
cmp ecx, edx
setne al
jmp 0x434efe
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x30]
mov dword [edi + 0x40], eax
mov eax, dword [ebp - 0x44]
mov dword [edi + 0x44], eax
mov ebx, dword [ebp + 8]
lea edx, [ebp - 0x32]
xor eax, eax
cmp ecx, edx
setne al
test eax, eax
js 0x434f50
cmp eax, 1
jle 0x434f23
cmp eax, 3
jne 0x434f50
push dword [edi + 0x4c]
push dword [ebp - 0x34]
call fcn.0043d6b0
add esp, 8
test al, al
movzx eax, bx
jne 0x434f55
jmp 0x434f50
lea eax, [ebp - 0x2c]
sub esi, eax
je 0x434f41
push dword [edi + 0x4c]
push esi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp esi, eax
jne 0x434f50
mov ecx, dword [ebp - 0x30]
lea eax, [ebp - 0x34]
mov byte [edi + 0x3e], 1
cmp ecx, eax
jne 0x434d9d
mov eax, 0xffff
mov ecx, dword [ebp - 4]
pop esi
pop edi
xor ecx, ebp
pop ebx
call fcn.00523a6a
mov esp, ebp
pop ebp
ret 4
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x32]
push eax
lea eax, [ebp - 0x34]
push eax
push edx
call esi
mov esi, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x30]
jmp 0x434efe