Function at 0x422e20
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov eax, dword [edi]
mov esi, dword [eax]
push 0x22
call fcn.004235f0
mov edx, dword [ebp + 0xc]
add esp, 4
cmp dword [ebp + 0x10], 0
jbe 0x423082
xor esi, esi
jmp 0x422e54
mov edx, dword [esp + 0x18]
movzx eax, word [edx]
mov ecx, eax
mov ebx, 0x100
cmp cx, bx
jae 0x422fc4
movzx ebx, cl
cmp byte [ebx + 0x4434e0], 0
je 0x422fc4
mov ecx, dword [edi]
add esi, 2
mov dword [esp + 0x10], esi
mov esi, dword [ecx]
mov eax, dword [esi + 0xc]
add edx, 2
mov dword [esp + 0x18], edx
cmp eax, dword [esi + 8]
jb 0x422eb4
mov ecx, dword [esi + 4]
cmp eax, ecx
je 0x422eb4
mov edx, dword [esi]
mov edi, dword [sym.imp.MSVCR100.dll_fwrite]
push edx
sub eax, ecx
push eax
push 1
push ecx
call edi
mov eax, dword [esi + 4]
add esp, 0x10
mov dword [esi + 0xc], eax
jmp 0x422eba
mov edi, dword [sym.imp.MSVCR100.dll_fwrite]
mov ecx, dword [esi + 0xc]
mov byte [ecx], 0x5c
inc dword [esi + 0xc]
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 8]
jb 0x422ee6
mov ecx, dword [esi + 4]
cmp eax, ecx
je 0x422ee6
mov edx, dword [esi]
push edx
sub eax, ecx
push eax
push 1
push ecx
call edi
mov eax, dword [esi + 4]
add esp, 0x10
mov dword [esi + 0xc], eax
mov ecx, dword [esi + 0xc]
mov byte [ecx], 0
inc dword [esi + 0xc]
movsx dx, byte [ebx + 0x4434e0]
mov ecx, dword [ebp + 8]
movzx eax, dx
mov edx, dword [ecx]
mov esi, dword [edx]
mov dword [esp + 0x14], eax
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 8]
jb 0x422f28
mov ecx, dword [esi + 4]
cmp eax, ecx
je 0x422f28
mov edx, dword [esi]
push edx
sub eax, ecx
push eax
push 1
push ecx
call edi
mov eax, dword [esi + 4]
add esp, 0x10
mov dword [esi + 0xc], eax
mov ecx, dword [esi + 0xc]
mov dl, byte [esp + 0x14]
mov byte [ecx], dl
inc dword [esi + 0xc]
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 8]
jb 0x422f57
mov ecx, dword [esi + 4]
cmp eax, ecx
je 0x422f57
mov edx, dword [esi]
push edx
sub eax, ecx
push eax
push 1
push ecx
call edi
mov eax, dword [esi + 4]
add esp, 0x10
mov dword [esi + 0xc], eax
mov ecx, dword [esp + 0x14]
mov edx, dword [esi + 0xc]
shr ecx, 8
mov byte [edx], cl
inc dword [esi + 0xc]
cmp byte [ebx + 0x4434e0], 0x75
jne 0x42306e
mov edi, dword [ebp + 8]
mov eax, dword [edi]
mov esi, dword [eax]
push 0x30
call fcn.004235f0
mov ecx, dword [edi]
mov esi, dword [ecx]
push 0x30
call fcn.004235f0
mov edx, ebx
shr edx, 4
movsx eax, byte [edx + str.0123456789ABCDEFinvalid_hash_bucket_count]
mov edx, dword [edi]
mov esi, dword [edx]
movzx ecx, ax
push ecx
call fcn.004235f0
mov edx, dword [edi]
mov esi, dword [edx]
and ebx, 0xf
movsx eax, byte [ebx + str.0123456789ABCDEFinvalid_hash_bucket_count]
movzx ecx, ax
push ecx
call fcn.004235f0
add esp, 0x10
jmp 0x42306e
mov ebx, dword [edi]
add edx, 2
mov dword [esp + 0x18], edx
add esi, 2
lea ecx, [eax + 0x2800]
mov edx, 0x7ff
mov dword [esp + 0x10], esi
cmp cx, dx
ja 0x42302d
mov ecx, 0xdbff
cmp ax, cx
ja 0x42306e
add dword [esp + 0x10], 2
and eax, 0x3ff
shl eax, 0xa
mov edx, eax
mov eax, dword [esp + 0x18]
movzx ecx, word [eax]
add eax, 2
mov dword [esp + 0x18], eax
mov eax, ecx
and eax, 0x3ff
or eax, edx
add ecx, 0x2400
mov edx, 0x3ff
add eax, 0x10000
cmp cx, dx
ja 0x42306e
mov esi, dword [ebx]
cmp eax, 0xffff
ja 0x423041
push eax
call fcn.004235f0
add esp, 4
jmp 0x42306e
lea edi, [eax - 0x10000]
mov eax, edi
shr eax, 0xa
or eax, 0xd800
push eax
call fcn.004235f0
mov esi, dword [ebx]
and edi, 0x3ff
or edi, 0xdc00
push edi
call fcn.004235f0
add esp, 8
mov esi, dword [esp + 0x10]
mov edi, dword [ebp + 8]
mov ecx, esi
sar ecx, 1
cmp ecx, dword [ebp + 0x10]
jb 0x422e50
mov edx, dword [edi]
mov esi, dword [edx]
push 0x22
call fcn.004235f0
add esp, 4
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret 0xc