Function at 0x428150
Capabilities:
Write file on windows

Disassembly:
push ebp
xor ebp, ebp
push edi
push esi
push ebx
sub esp, 0x4c
mov edx, dword [esp + 0x60]
mov esi, dword [esp + 0x64]
mov dword [esp + 0x3c], 0
jmp 0x4281b9
mov edi, eax
sub edi, dword [esp + 0x60]
cmp esi, edi
ja 0x4281f2
cmp cl, 0xbf
jbe 0x428188
cmp byte [edx + 2], 0
lea eax, [edx + 2]
jne 0x428192
mov edx, eax
sub edx, dword [esp + 0x60]
cmp esi, edx
ja 0x4281f2
cmp cl, 0xdf
jbe 0x4281ac
mov edx, eax
add eax, 1
cmp byte [edx + 1], 0
jne 0x4281ac
mov edx, eax
sub edx, dword [esp + 0x60]
cmp esi, edx
ja 0x4281f2
cmp cl, 0xef
ja 0x4285a0
mov edx, eax
mov ebp, ebx
mov eax, edx
sub eax, dword [esp + 0x60]
cmp esi, eax
jbe 0x4281f4
movzx ecx, byte [edx]
lea eax, [edx + 1]
test cl, cl
je 0x4281f4
lea ebx, [ebp + 1]
cmp ebx, 0x103
ja 0x4285b2
cmp cl, 0xf4
ja 0x428660
cmp byte [edx + 1], 0
je 0x428170
cmp cl, 0xbf
ja 0x42817f
jmp 0x428192
mov ebp, ebx
mov eax, dword [esp + 0x68]
mov ebx, dword [eax]
test ebx, ebx
je 0x4286d0
mov eax, dword [esp + 0x6c]
test eax, eax
je 0x428713
mov eax, dword [esp + 0x6c]
mov esi, dword [eax]
cmp esi, ebp
jb 0x428510
mov eax, dword [esp + 0x64]
mov dword [esp + 0x3c], ebx
mov edx, ebx
xor edi, edi
test eax, eax
je 0x4282fd
mov eax, dword [0x555070]
mov dword [esp + 0x28], ebp
mov edx, ebx
xor ecx, ecx
mov edi, dword [esp + 0x60]
mov esi, ebx
mov dword [esp + 0x24], eax
mov esi, esi
lea edi, [edi]
movzx eax, byte [edi]
test al, al
jne 0x4282a0
xor eax, eax
mov ebp, dword [esp + 0x28]
mov ebx, esi
mov word [edx], ax
sub edx, esi
mov edi, edx
sar edi, 1
cmp ebp, edi
jne 0x428315
mov eax, dword [esp + 0x68]
cmp dword [eax], ebx
je 0x42827a
mov dword [eax], ebx
mov ebx, dword [esp + 0x6c]
test ebx, ebx
je 0x428590
mov eax, dword [esp + 0x6c]
xor esi, esi
mov dword [eax], edi
add esp, 0x4c
xor edi, edi
mov eax, esi
pop ebx
mov edx, edi
pop esi
pop edi
pop ebp
ret
mov ebx, dword [esp + 0x64]
sub ebx, ecx
mov ecx, ebx
test al, al
js 0x428391
mov ebp, dword [esp + 0x24]
movzx ebx, al
test ebp, ebp
jne 0x428674
mov ecx, 1
movzx eax, ah
mov byte [edx], bl
add edx, 2
mov byte [edx - 1], al
add edi, ecx
mov ecx, edi
sub ecx, dword [esp + 0x60]
cmp dword [esp + 0x64], ecx
ja 0x428250
mov edi, edx
mov ebp, dword [esp + 0x28]
mov ebx, esi
sub edi, esi
sar edi, 1
mov eax, dword [esp + 0x68]
mov ecx, dword [eax]
test ecx, ecx
je 0x428308
mov eax, dword [esp + 0x6c]
mov esi, dword [eax]
lea eax, [ebp + 1]
cmp eax, esi
ja 0x428268
xor esi, esi
mov word [edx], si
cmp ebp, edi
je 0x428270
mov ebx, dword [fcn.004a1b90]
mov dword [esp], 2
mov esi, 7
call ebx
mov dword [esp + 0x10], edi
mov edi, 1
mov dword [esp + 0xc], ebp
mov dword [esp + 8], 0x4b8d00
mov dword [esp + 4], str.__s__Internal_error___Filled_length_is_not_as_expected._Expected:__Iu_Actual:__Id
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [esp], 2
call ebx
mov dword [esp + 8], 2
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], 0x4b8d27
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call ebx
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov ebx, dword [esp + 0x3c]
jmp 0x42843c
cmp al, 0xc1
jbe 0x428430
cmp al, 0xdf
ja 0x428460
cmp ebx, 1
jbe 0x428430
movzx ebx, byte [edi + 1]
mov ebp, ebx
and ebp, 0xc0
cmp ebp, 0x80
jne 0x428430
shl eax, 6
and ebx, 0x3f
mov ebp, dword [esp + 0x24]
and eax, 0x7c0
or ebx, eax
mov eax, ebx
test ebp, ebp
jne 0x4288c0
mov ecx, 2
jmp 0x4282c4
cmp ebx, 3
jbe 0x428430
cmp al, 0xf4
ja 0x428430
movsx ecx, byte [edi + 1]
mov ebx, ecx
and ebx, 0xc0
cmp ebx, 0x80
jne 0x428430
movsx ebp, byte [edi + 2]
mov ebx, ebp
and ebx, 0xc0
cmp ebx, 0x80
jne 0x428430
movzx ebx, byte [edi + 3]
mov byte [esp + 0x2c], bl
and ebx, 0xc0
cmp ebx, 0x80
je 0x4287c0
nop
mov ebx, esi
mov edi, 1
mov esi, 0xf
mov eax, dword [esp + 0x68]
cmp dword [eax], ebx
je 0x428454
lea eax, [esp + 0x3c]
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.0041d440
add esp, 0x4c
mov eax, esi
mov edx, edi
pop ebx
pop esi
pop edi
pop ebp
ret
cmp al, 0xef
ja 0x4283e3
cmp ebx, 2
jbe 0x428430
movsx ebp, byte [edi + 1]
mov ebx, ebp
mov dword [esp + 0x2c], ebp
and ebx, 0xc0
cmp ebx, 0x80
jne 0x428430
movzx ebx, byte [edi + 2]
mov ebp, ebx
and ebp, 0xc0
cmp ebp, 0x80
jne 0x428430
mov ebp, dword [esp + 0x2c]
and ebx, 0x3f
shl eax, 0xc
and eax, 0xf000
shl ebp, 6
and ebp, 0xfc0
or ebx, ebp
or ebx, eax
lea eax, [ebx - 0x800]
cmp eax, 0xf7ff
ja 0x428430
mov eax, dword [esp + 0x24]
test eax, eax
je 0x428923
cmp ebx, 0xffff
je 0x42890f
lea ebp, [ebx + 0xfff]
mov eax, ebx
cmp bp, 0x26
ja 0x4286a5
movzx eax, word [ebx + ebx + 0x49af9e]
cmp ecx, 3
je 0x428502
mov ecx, 3
mov ebx, eax
jmp 0x4282c4
mov ebx, dword [fcn.004a1b90]
mov dword [esp], 2
mov edi, 1
call ebx
mov dword [esp + 0xc], esi
mov esi, 8
mov dword [esp + 0x10], ebp
mov dword [esp + 8], 0x4b8d00
mov dword [esp + 4], str.__s__Preallocated_buffer_is_too_small_to_hold_the_UTF_16_result._outs_len___Iu____shorts___Iu_
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [esp], 2
call ebx
mov dword [esp + 8], 2
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], 0x4b8d27
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call ebx
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov ebx, dword [esp + 0x3c]
jmp 0x42843c
xor esi, esi
xor edi, edi
jmp 0x428454
add ebp, 2
lea edx, [eax + 1]
cmp ebp, 0x104
jne 0x4281b9
mov ebp, 8
mov esi, 8
mov edi, 1
mov dword [esp], esi
mov dword [esp + 4], edi
call fcn.0041d490
mov ebx, dword [fcn.004a1b90]
mov dword [esp], 2
mov dword [esp + 0x24], eax
call ebx
mov ecx, dword [esp + 0x60]
mov edx, dword [esp + 0x24]
mov dword [esp + 0x18], ebp
mov dword [esp + 8], 0x4b8d00
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x64]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], ecx
mov dword [esp + 4], str.__s__Error_while_getting_UTF_16_size_for__Iu_byte_UTF_8_string___.s_:__lu___s_
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [esp], 2
call ebx
mov dword [esp + 8], 2
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], 0x4b8d27
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call ebx
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov ebx, dword [esp + 0x3c]
jmp 0x42843c
mov ebp, 0xf
mov esi, 0xf
mov edi, 1
jmp 0x4285c1
mov ebp, 1
cmp ebx, 0x7c
jbe 0x4288ca
mov ebx, eax
cmp ecx, ebp
jne 0x4287b0
cmp bx, 0x2e
jne 0x428502
mov eax, 0xfffffff0
mov ebx, 0x29
jmp 0x4282c7
cmp bx, 0xf02a
jne 0x428793
cmp ecx, 3
je 0x4286ba
mov ecx, 3
mov eax, 0xfffff8ff
mov ebx, eax
jmp 0x4282c4
lea eax, [esp + 0x3c]
lea ebx, [ebp + ebp + 2]
mov dword [esp], 0
mov dword [esp + 8], eax
mov dword [esp + 4], ebx
call fcn.00427280
mov esi, eax
mov eax, edx
mov edi, edx
or eax, esi
jne 0x428835
mov eax, dword [esp + 0x64]
mov ebx, dword [esp + 0x3c]
test eax, eax
jne 0x428230
mov edx, ebx
xor edi, edi
jmp 0x4282ed
mov esi, dword [fcn.004a1b90]
mov dword [esp], 2
mov edi, 1
call esi
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], 0
mov dword [esp + 8], 0x4b8d00
mov dword [esp + 4], str.__s__Preallocated_outs__but_no_outs_len_specified._outs_p_outs_len_p
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [esp], 2
call esi
mov dword [esp + 8], 2
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], 0x4b8d27
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call esi
mov esi, 3
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov ebx, dword [esp + 0x3c]
jmp 0x42843c
cmp bx, 0xf8ff
jne 0x4288eb
mov eax, 0xfffff02a
jmp 0x4284f8
mov ecx, ebp
mov ebx, eax
jmp 0x4282c4
shl ebp, 6
shl ecx, 0xc
mov ebx, ebp
mov ebp, dword [esp + 0x2c]
and ecx, 0x3f000
shl eax, 0x12
and ebx, 0xfc0
and eax, 0x1c0000
and ebp, 0x3f
or ecx, ebx
or ecx, ebp
or ecx, eax
lea ebp, [ecx - 0x10000]
cmp ebp, 0xfffff
ja 0x428430
mov eax, ebp
mov ecx, 4
and bp, 0x3ff
add edx, 4
shr eax, 0xa
sub bp, 0x2400
add edi, ecx
sub ax, 0x2800
mov word [edx - 2], bp
mov ecx, edi
sub ecx, dword [esp + 0x60]
mov word [edx - 4], ax
cmp dword [esp + 0x64], ecx
ja 0x428250
jmp 0x4282e1
mov dword [esp + 4], edx
mov dword [esp], esi
call fcn.0041d490
mov ebp, dword [fcn.004a1b90]
mov dword [esp], 2
mov dword [esp + 0x24], eax
call ebp
mov edx, dword [esp + 0x24]
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], edx
mov dword [esp + 8], 0x4b8d00
mov dword [esp + 4], str.__s__Error_while_allocating__Iu_bytes_for_UTF_16_result:__lu___s_
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [esp], 2
call ebp
mov dword [esp + 8], 2
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], 0x4b8d27
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call ebp
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov ebx, dword [esp + 0x3c]
jmp 0x42843c
mov ebp, 2
jmp 0x428682
movzx ebp, word [ebx + ebx + 0x4b9000]
cmp ecx, 1
jne 0x4288fe
cmp ebx, 0x20
jne 0x4288f5
mov eax, 0xfffffff0
mov ebx, 0x28
jmp 0x4282c7
mov ebp, 3
jmp 0x428684
mov ebx, eax
mov eax, ebp
jmp 0x42868c
mov eax, ebp
mov ebx, ebp
mov ecx, 1
movzx eax, ah
jmp 0x4282c7
mov eax, 0xffffffff
mov ebx, 0xffffffff
mov ecx, 3
jmp 0x4282c7
mov word [edx], bx
mov ecx, 3
add edx, 2
jmp 0x4282cf