Function at 0x4223a0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x104
push ebx
push esi
mov eax, dword [ecx + 8]
push edi
mov ebx, ecx
and eax, 0xffffff
add eax, 0x8000
cmp eax, 0x10000
jae 0x42240f
mov cl, byte [ebx]
mov eax, dword [0x45ca50]
dec dword [eax + 4]
mov eax, dword [0x45ca50]
cmp dword [eax + 4], 0
jl 0x422414
mov edx, dword [eax]
mov esi, dword [sym.imp.MSVCRT40.dll__flsbuf]
mov byte [edx], cl
mov eax, dword [0x45ca50]
inc dword [eax]
mov cl, byte [ebx]
and cl, 0xbf
cmp cl, 0x20
jae 0x43902b
xor eax, eax
mov al, cl
cmp eax, 0x16
ja case.0x422408.5
xor ecx, ecx
mov cl, byte [eax + 0x4227f0]
jmp dword [ecx*4 + 0x4227c0]
or byte [ebx], 0x40
jmp 0x4223bf
mov eax, dword [0x45ca50]
mov esi, dword [sym.imp.MSVCRT40.dll__flsbuf]
movsx ecx, cl
push eax
push ecx
call esi
add esp, 8
jmp 0x4223e5
mov eax, dword [0x45ca50]
dec dword [eax + 4]
mov eax, dword [0x45ca50]
cmp dword [eax + 4], 0
jl 0x439039
mov ecx, dword [eax]
mov byte [ecx], 2
mov eax, dword [0x45ca50]
inc dword [eax]
mov eax, dword [0x45ca50]
dec dword [eax + 4]
mov eax, dword [0x45ca50]
cmp dword [eax + 4], 0
jl 0x43904b
mov ecx, dword [eax]
mov byte [ecx], 0
mov eax, dword [0x45ca50]
inc dword [eax]
mov eax, dword [0x45ca50]
dec dword [eax + 4]
mov eax, dword [0x45ca50]
cmp dword [eax + 4], 0
jl 0x43905d
mov ecx, dword [eax]
mov byte [ecx], 2
mov eax, dword [0x45ca50]
inc dword [eax]
mov eax, dword [0x45ca50]
dec dword [eax + 4]
mov eax, dword [0x45ca50]
cmp dword [eax + 4], 0
jl 0x43906f
mov ecx, dword [eax]
mov byte [ecx], 0
mov eax, dword [0x45ca50]
inc dword [eax]
mov esi, dword [0x45ca50]
call fcn.00425303
mov edx, esi
mov ecx, eax
call fcn.00421f5b
pop edi
pop esi
pop ebx
add esp, 0x104
ret
mov edx, dword [0x45ca50]
mov ecx, dword [ebx + 0xc]
call fcn.00421f5b
pop edi
pop esi
pop ebx
add esp, 0x104
ret
mov eax, dword [ebx + 4]
mov ecx, dword [0x45ca50]
mov word [esp + 0xe], ax
sub dword [ecx + 4], 2
mov ecx, dword [0x45ca50]
mov eax, dword [ecx + 4]
add ecx, 4
test eax, eax
jl 0x422530
mov cx, word [esp + 0xe]
mov eax, dword [0x45ca50]
pop edi
pop esi
mov edx, dword [eax]
pop ebx
mov word [edx], cx
mov eax, dword [0x45ca50]
add dword [eax], 2
add esp, 0x104
ret
add eax, 2
lea edx, [esp + 0xe]
mov dword [ecx], eax
mov ecx, dword [0x45ca50]
push ecx
push 1
push 2
push edx
call dword [sym.imp.MSVCRT40.dll_fwrite]
add esp, 0x10
pop edi
pop esi
pop ebx
add esp, 0x104
ret
mov cl, byte [ebx + 1]
mov eax, dword [0x45ca50]
dec dword [eax + 4]
mov eax, dword [0x45ca50]
cmp dword [eax + 4], 0
jl 0x422651
mov edx, dword [eax]
mov byte [edx], cl
mov eax, dword [0x45ca50]
inc dword [eax]
mov eax, dword [0x45ca50]
sub dword [eax + 4], 2
mov ecx, dword [0x45ca50]
mov eax, dword [ecx + 4]
add ecx, 4
test eax, eax
jl 0x422665
mov cx, word [ebx + 0x14]
mov eax, dword [0x45ca50]
mov edx, dword [eax]
mov word [edx], cx
mov eax, dword [0x45ca50]
add dword [eax], 2
mov eax, dword [ebx + 8]
mov ecx, dword [0x45ca50]
and eax, 0xffffff
dec dword [ecx + 4]
mov ecx, dword [0x45ca50]
mov dword [esp + 0x10], eax
cmp dword [ecx + 4], 0
jl 0x422687
mov cl, al
mov eax, dword [0x45ca50]
mov edx, dword [eax]
mov byte [edx], cl
mov eax, dword [0x45ca50]
inc dword [eax]
mov eax, dword [0x45ca50]
dec dword [eax + 4]
mov eax, dword [0x45ca50]
cmp dword [eax + 4], 0
jl 0x42269d
mov cl, byte [esp + 0x11]
mov edx, dword [eax]
mov byte [edx], cl
mov eax, dword [0x45ca50]
inc dword [eax]
test byte [ebx], 0x40
jne 0x4226b3
mov edi, dword [ebx + 0xc]
test edi, edi
je 0x4390e6
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 0x100
jae 0x439097
mov edx, dword [0x45ca50]
mov ecx, dword [ebx + 0xc]
call fcn.00421f5b
pop edi
pop esi
pop ebx
add esp, 0x104
ret
movsx ecx, cl
mov eax, dword [0x45ca50]
push eax
push ecx
call esi
add esp, 8
jmp 0x42257d
add eax, 2
lea edx, [ebx + 0x14]
mov dword [ecx], eax
mov ecx, dword [0x45ca50]
push ecx
push 1
push 2
push edx
call dword [sym.imp.MSVCRT40.dll_fwrite]
add esp, 0x10
jmp 0x4225b0
movsx ecx, byte [esp + 0x10]
mov eax, dword [0x45ca50]
push eax
push ecx
call esi
add esp, 8
jmp 0x4225e7
movsx ecx, byte [esp + 0x11]
mov eax, dword [0x45ca50]
push eax
push ecx
call esi
add esp, 8
jmp 0x42260d
mov eax, dword [0x45ca50]
dec dword [eax + 4]
mov eax, dword [0x45ca50]
cmp dword [eax + 4], 0
jl 0x439081
mov cl, byte [esp + 0x12]
mov edx, dword [eax]
mov byte [edx], cl
mov eax, dword [0x45ca50]
inc dword [eax]
jmp 0x422616
mov eax, dword [ebx + 8]
mov ecx, dword [0x45ca50]
and eax, 0xffffff
dec dword [ecx + 4]
mov ecx, dword [0x45ca50]
mov dword [esp + 0x10], eax
cmp dword [ecx + 4], 0
jl 0x422742
mov cl, al
mov eax, dword [0x45ca50]
mov edx, dword [eax]
mov byte [edx], cl
mov eax, dword [0x45ca50]
inc dword [eax]
mov eax, dword [0x45ca50]
dec dword [eax + 4]
mov eax, dword [0x45ca50]
cmp dword [eax + 4], 0
jl 0x422755
mov cl, byte [esp + 0x11]
mov edx, dword [eax]
mov byte [edx], cl
mov eax, dword [0x45ca50]
inc dword [eax]
test byte [ebx], 0x40
jne 0x422768
pop edi
pop esi
pop ebx
add esp, 0x104
ret
movsx ecx, byte [esp + 0x10]
mov eax, dword [0x45ca50]
push eax
push ecx
call esi
add esp, 8
jmp 0x422711
movsx ecx, byte [esp + 0x11]
mov eax, dword [0x45ca50]
push eax
push ecx
call esi
add esp, 8
jmp 0x422733
mov eax, dword [0x45ca50]
dec dword [eax + 4]
mov eax, dword [0x45ca50]
cmp dword [eax + 4], 0
jl 0x422794
mov cl, byte [esp + 0x12]
mov edx, dword [eax]
pop edi
pop esi
pop ebx
mov byte [edx], cl
mov eax, dword [0x45ca50]
inc dword [eax]
add esp, 0x104
ret
movsx ecx, byte [esp + 0x12]
mov eax, dword [0x45ca50]
push eax
push ecx
call esi
add esp, 8
jmp case.0x422408.5
cmp cl, 0x2f
ja 0x4223f3
jmp case.0x422408.5
mov eax, dword [0x45ca50]
push eax
push 2
call esi
add esp, 8
jmp 0x42244e
mov eax, dword [0x45ca50]
push eax
push 0
call esi
add esp, 8
jmp 0x422471
mov eax, dword [0x45ca50]
push eax
push 2
call esi
add esp, 8
jmp 0x422494
mov eax, dword [0x45ca50]
push eax
push 0
call esi
add esp, 8
jmp 0x4224b7
movsx ecx, byte [esp + 0x12]
mov eax, dword [0x45ca50]
push eax
push ecx
call esi
add esp, 8
jmp 0x422616
push 0x165
mov eax, dword [ebx + 0xc]
push 0xff
push eax
push 0x312
push 3
call fcn.00416761
lea edi, [esp + 0x24]
add esp, 0x14
mov esi, dword [ebx + 0xc]
mov ecx, 0x3f
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x10]
mov edx, dword [0x45ca50]
mov byte [esp + 0x10f], 0
call fcn.00421f5b
pop edi
pop esi
pop ebx
add esp, 0x104
ret
mov ecx, 0x4521f4
mov edx, dword [0x45ca50]
call fcn.00421f5b
pop edi
pop esi
pop ebx
add esp, 0x104
ret