Function at 0x4214b0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x52cca8
mov eax, dword fs:[0]
push eax
sub esp, 0x44
mov eax, dword [0x5c6150]
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 ebx, ecx
mov dword [ebp - 0x40], ebx
mov edi, dword [ebp + 8]
mov edx, 0xffff
cmp dx, di
jne 0x4214f4
xor eax, eax
jmp 0x4217f6
mov eax, dword [ebx + 0x20]
mov ecx, dword [eax]
test ecx, ecx
je 0x421528
mov edx, dword [ebx + 0x30]
mov esi, dword [edx]
lea eax, [ecx + esi*2]
cmp ecx, eax
jae 0x421523
lea ecx, [esi - 1]
mov ax, di
mov dword [edx], ecx
mov edx, dword [ebx + 0x20]
mov esi, dword [edx]
lea ecx, [esi + 2]
mov dword [edx], ecx
mov word [esi], di
jmp 0x4217f6
mov edx, 0xffff
cmp dword [ebx + 0x4c], 0
jne 0x421536
mov ax, dx
jmp 0x4217f6
mov esi, dword [ebx + 0xc]
lea eax, [ebx + 0x3c]
cmp dword [esi], eax
jne 0x421556
mov edx, dword [ebx + 0x54]
mov ecx, dword [ebx + 0x50]
sub edx, ecx
mov dword [esi], ecx
mov eax, dword [ebx + 0x1c]
sar edx, 1
mov dword [eax], ecx
mov eax, dword [ebx + 0x2c]
mov dword [eax], edx
cmp dword [ebx + 0x38], 0
jne 0x421580
push dword [ebx + 0x4c]
push edi
call fcn.004e3be0
mov ecx, 0xffff
add esp, 8
cmp ax, cx
movzx eax, di
jne 0x4217f6
mov eax, ecx
jmp 0x4217f6
push 0
movzx eax, di
lea ecx, [ebp - 0x30]
push 8
mov dword [ebp - 0x3c], eax
call fcn.004207d0
lea edi, [ebx + 0x40]
mov dword [ebp - 4], 0
mov dword [ebp - 0x48], edi
mov eax, dword [ebp - 0x40]
mov edx, dword [ebp - 0x30]
mov ebx, dword [ebp - 0x1c]
nop dword [eax + eax]
cmp ebx, 0x10
lea ecx, [ebp - 0x30]
mov ebx, dword [ebp - 0x20]
lea esi, [ebp - 0x30]
cmovae ecx, edx
cmovae esi, edx
mov edx, dword [eax + 0x38]
add ebx, ecx
mov dword [ebp - 0x4c], edx
mov eax, dword [edx]
mov ecx, dword [eax + 0x1c]
mov dword [ebp - 0x44], ecx
cmp eax, vtable.std::codecvt_wchar_t__char__struct__Mbstatet_.0
jne 0x4216ab
lea ecx, [ebp - 0x3c]
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x34], ecx
cmp esi, ebx
je 0x42169f
mov eax, ebx
sub eax, esi
cmp eax, 5
jl 0x42161e
lea eax, [edx + 8]
push eax
movzx eax, word [ecx]
push edi
push eax
push esi
call fcn.004d6561
add esp, 0x10
test eax, eax
js 0x4217b6
mov ecx, dword [ebp - 0x34]
mov esi, dword [ebp - 0x38]
add ecx, 2
add esi, eax
jmp 0x42166f
mov eax, dword [edi]
mov dword [ebp - 0x50], eax
mov eax, dword [edi + 4]
mov dword [ebp - 0x44], eax
lea eax, [edx + 8]
push eax
movzx eax, word [ecx]
push edi
push eax
lea eax, [ebp - 0x18]
push eax
call fcn.004d6561
mov edi, eax
add esp, 0x10
test edi, edi
js 0x4217b6
mov esi, dword [ebp - 0x38]
mov ecx, ebx
sub ecx, esi
cmp ecx, edi
jl 0x42168e
push edi
lea eax, [ebp - 0x18]
push eax
push esi
call fcn.004d9a60
mov ecx, dword [ebp - 0x34]
add esp, 0xc
mov esi, dword [ebp - 0x38]
add ecx, 2
add esi, edi
mov edi, dword [ebp - 0x48]
mov edx, dword [ebp - 0x4c]
lea eax, [ebp - 0x3a]
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x34], ecx
cmp ecx, eax
jne 0x4215e6
mov edx, eax
xor eax, eax
cmp ecx, edx
setne al
jmp 0x4216c9
mov edi, dword [ebp - 0x48]
mov eax, dword [ebp - 0x50]
mov ecx, dword [ebp - 0x34]
mov dword [edi], eax
mov eax, dword [ebp - 0x44]
mov dword [edi + 4], eax
lea edx, [ebp - 0x3a]
xor eax, eax
cmp ecx, edx
setne al
jmp 0x4216c9
lea eax, [ebp - 0x38]
mov ecx, edx
push eax
push ebx
push esi
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x3a]
push eax
lea eax, [ebp - 0x3c]
push eax
push edi
call dword [ebp - 0x44]
mov esi, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x34]
test eax, eax
js 0x4217b6
cmp eax, 1
jg 0x421772
mov ebx, dword [ebp - 0x1c]
lea eax, [ebp - 0x30]
mov edx, dword [ebp - 0x30]
cmp ebx, 0x10
cmovae eax, edx
sub esi, eax
je 0x421715
mov ecx, dword [ebp - 0x40]
lea eax, [ebp - 0x30]
cmp ebx, 0x10
cmovae eax, edx
push dword [ecx + 0x4c]
push esi
push 1
push eax
call fcn.004e45f2
mov ebx, dword [ebp - 0x1c]
add esp, 0x10
mov edx, dword [ebp - 0x30]
cmp esi, eax
jne 0x421744
mov ecx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x40]
lea edi, [ebp - 0x3c]
cmp ecx, edi
mov byte [eax + 0x3e], 1
lea edi, [eax + 0x40]
jne 0x421761
test esi, esi
jne 0x4215b0
cmp dword [ebp - 0x20], 0x20
jae 0x421754
push esi
push 8
lea ecx, [ebp - 0x30]
call fcn.00421f10
jmp 0x42159f
mov eax, 0xffff
movzx eax, ax
movzx eax, ax
movzx esi, ax
jmp 0x4217c1
mov eax, 0xffff
movzx eax, ax
movzx esi, ax
jmp 0x4217c1
mov eax, dword [ebp + 8]
movzx eax, ax
movzx eax, ax
movzx eax, ax
movzx esi, ax
jmp 0x4217c1
cmp eax, 3
jne 0x4217b6
mov eax, dword [ebp - 0x40]
push dword [eax + 0x4c]
push dword [ebp - 0x3c]
call fcn.004e3be0
mov ecx, 0xffff
add esp, 8
cmp ax, cx
je 0x4217a6
mov eax, dword [ebp + 8]
mov ebx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x30]
movzx eax, ax
movzx eax, ax
movzx esi, ax
jmp 0x4217c1
mov ebx, dword [ebp - 0x1c]
mov eax, ecx
mov edx, dword [ebp - 0x30]
movzx eax, ax
movzx esi, ax
jmp 0x4217c1
mov ebx, dword [ebp - 0x1c]
mov esi, 0xffff
mov edx, dword [ebp - 0x30]
cmp ebx, 0x10
jb 0x4217f3
lea eax, [ebx + 1]
cmp eax, 0x1000
jb 0x4217ea
test dl, 0x1f
jne 0x421814
mov eax, dword [edx - 4]
cmp eax, edx
jae 0x421814
sub edx, eax
cmp edx, 4
jb 0x421814
cmp edx, 0x23
ja 0x421814
mov edx, eax
push edx
call fcn.004d6cf8
add esp, 4
mov ax, si
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.004d6cfd
mov esp, ebp
pop ebp
ret 4
call fcn.004e1d90
int3