Function at 0x4ac8c0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x18
mov ecx, dword [0x4d8f4c]
push ebx
push ebp
mov ebp, dword [esp + 0x24]
movzx eax, word [ebp + 0x20]
xor ebx, ebx
push esi
or edx, 0xffffffff
push edi
mov dword [esp + 0x10], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x20], ebx
lea edi, [ebx + 1]
cmp dword [esp + 0x30], ebx
jne 0x4ac950
mov dword [0x5097c4], ebx
cmp dword [ebp + 0x14], ebx
ja 0x4ac922
mov eax, 0x7fffffff
jb 0x4ac90e
cmp dword [ebp + 0x10], eax
ja 0x4ac922
cmp dword [ebp + 0x1c], ebx
ja 0x4ac922
jb 0x4ac91a
cmp dword [ebp + 0x18], eax
ja 0x4ac922
cmp ecx, edi
jne 0x4aca22
cmp ecx, ebx
jne 0x4ac92d
push 6
call fcn.004a78d0
mov dword [0x5097c4], edi
mov dword [0x5097c8], edi
cmp word [ebp + 2], 0x2d
jae 0x4ac949
mov ecx, 0x2d
mov word [ebp + 2], cx
mov esi, edi
jmp 0x4aca0a
mov esi, dword [0x5097c4]
mov dword [0x5097c4], ebx
cmp dword [ebp + 0x14], ebx
ja 0x4ac97d
mov eax, 0x7fffffff
jb 0x4ac96d
cmp dword [ebp + 0x10], eax
ja 0x4ac97d
cmp dword [ebp + 0x1c], ebx
ja 0x4ac97d
jb 0x4ac979
cmp dword [ebp + 0x18], eax
ja 0x4ac97d
cmp ecx, edi
jne 0x4ac9bc
mov eax, edi
mov dword [0x5097c4], eax
cmp esi, ebx
jne 0x4ac9a7
cmp dword [ebp + 0x14], ebx
ja 0x4ac9a7
jb 0x4ac994
cmp dword [ebp + 0x10], edx
ja 0x4ac9a7
cmp dword [ebp + 0x1c], ebx
ja 0x4ac9a7
jb 0x4ac9a0
cmp dword [ebp + 0x18], edx
ja 0x4ac9a7
xor eax, eax
mov dword [0x5097c4], eax
cmp ecx, ebx
jne 0x4ac9bc
cmp eax, ebx
je 0x4ac9bc
push 6
call fcn.004a78d0
mov ecx, dword [0x4d8f4c]
cmp esi, ebx
jne 0x4ac9cf
cmp dword [0x5097c4], edi
jne 0x4ac9cf
push 6
call fcn.004a78d0
cmp dword [0x5097c4], ebx
je 0x4ac9ef
mov dword [0x5097c8], edi
cmp word [ebp + 2], 0x2d
jae 0x4ac9f5
mov edx, 0x2d
mov word [ebp + 2], dx
jmp 0x4ac9f5
mov dword [0x5097c4], ebx
cmp esi, ebx
je 0x4aca0a
cmp dword [0x5097c4], edi
je 0x4aca0a
mov eax, 0x14
mov word [ebp + 2], ax
cmp dword [0x5097c4], ebx
jne 0x4aca16
cmp esi, ebx
je 0x4aca22
mov edi, ebp
call fcn.004aa8d0
mov edi, 1
cmp dword [ebp + 0x58], ebx
je 0x4aca9b
cmp dword [0x5097d0], ebx
jne 0x4aca37
cmp dword [0x509794], ebx
je 0x4aca46
mov ecx, 0x800
or word [ebp + 0x2e], cx
mov edx, ecx
or word [ebp + 4], dx
mov eax, 0x800
test word [ebp + 4], ax
je 0x4aca92
movzx eax, word [esp + 0x2c]
cdq
sub dword [0x508358], eax
mov dword [esp + 0x20], edi
sbb dword [0x50835c], edx
mov eax, dword [ebp + 0x58]
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4aca70
sub eax, edx
movzx eax, ax
mov dword [esp + 0x2c], eax
movzx eax, ax
cdq
add dword [0x508358], eax
adc dword [0x50835c], edx
jmp 0x4acaaa
mov edi, ebp
call fcn.004aaab0
jmp 0x4acaaa
mov ecx, 0xf7ff
and word [ebp + 4], cx
mov edx, ecx
and word [ebp + 0x2e], dx
mov eax, dword [ebp + 0x4c]
mov dword [esp + 0x1c], eax
cmp dword [esp + 0x20], ebx
je 0x4acabe
mov ecx, dword [ebp + 0x58]
mov dword [esp + 0x1c], ecx
lea ecx, [esp + 0x14]
lea edi, [esp + 0x18]
lea esi, [esp + 0x10]
mov eax, 0x4034b50
call fcn.004a9da0
movzx edx, word [ebp + 2]
mov esi, dword [esp + 0x10]
mov edi, dword [esp + 0x18]
mov dword [esp + 0x24], edx
cmp esi, ebx
jne 0x4acafc
mov ebx, 0x400
push ebx
mov dword [esp + 0x18], ebx
call fcn.004b1137
add esp, 4
jmp 0x4acb1b
mov ebx, dword [esp + 0x14]
lea eax, [ebx - 3]
cmp edi, eax
jbe 0x4acb2c
add ebx, 0x400
push ebx
push esi
mov dword [esp + 0x1c], ebx
call fcn.004b128f
add esp, 8
mov esi, eax
mov dword [esp + 0x10], esi
test esi, esi
jne 0x4acb2c
push 4
call fcn.004a78d0
mov eax, dword [esp + 0x24]
mov byte [edi + esi], al
shr eax, 8
mov byte [edi + esi + 1], al
movzx eax, word [ebp + 0x2e]
add edi, 2
mov dword [esp + 0x18], eax
test esi, esi
jne 0x4acb5d
mov ebx, 0x400
push ebx
mov dword [esp + 0x18], ebx
call fcn.004b1137
add esp, 4
jmp 0x4acb78
lea ecx, [ebx - 3]
cmp edi, ecx
jbe 0x4acb8d
add ebx, 0x400
push ebx
push esi
mov dword [esp + 0x1c], ebx
call fcn.004b128f
add esp, 8
mov esi, eax
mov dword [esp + 0x10], esi
test esi, esi
jne 0x4acb89
push 4
call fcn.004a78d0
mov eax, dword [esp + 0x18]
mov byte [edi + esi], al
shr eax, 8
mov byte [edi + esi + 1], al
movzx edx, word [ebp + 6]
add edi, 2
mov dword [esp + 0x24], edx
test esi, esi
jne 0x4acbbd
push 0x400
mov dword [esp + 0x18], 0x400
call fcn.004b1137
add esp, 4
jmp 0x4acbd8
lea eax, [ebx - 3]
cmp edi, eax
jbe 0x4acbe9
add ebx, 0x400
push ebx
push esi
mov dword [esp + 0x1c], ebx
call fcn.004b128f
add esp, 8
mov esi, eax
mov dword [esp + 0x10], esi
test esi, esi
jne 0x4acbe9
push 4
call fcn.004a78d0
mov eax, dword [esp + 0x24]
mov byte [edi + esi], al
shr eax, 8
mov byte [edi + esi + 1], al
mov eax, dword [ebp + 8]
add edi, 2
mov dword [esp + 0x18], edi
lea ecx, [esp + 0x14]
lea edi, [esp + 0x18]
lea esi, [esp + 0x10]
call fcn.004a9da0
mov eax, dword [ebp + 0xc]
lea ecx, [esp + 0x14]
call fcn.004a9da0
cmp dword [0x5097c4], 0
lea ecx, [esp + 0x14]
je 0x4acc38
or eax, 0xffffffff
call fcn.004a9da0
or eax, 0xffffffff
jmp 0x4acc43
mov eax, dword [ebp + 0x10]
call fcn.004a9da0
mov eax, dword [ebp + 0x18]
lea ecx, [esp + 0x14]
lea edi, [esp + 0x18]
lea esi, [esp + 0x10]
call fcn.004a9da0
mov esi, dword [esp + 0x10]
mov edi, dword [esp + 0x18]
test esi, esi
jne 0x4acc77
push 0x400
mov dword [esp + 0x18], 0x400
call fcn.004b1137
add esp, 4
jmp 0x4acc95
mov eax, dword [esp + 0x14]
lea ecx, [eax - 3]
cmp edi, ecx
jbe 0x4acca6
add eax, 0x400
push eax
push esi
mov dword [esp + 0x1c], eax
call fcn.004b128f
add esp, 8
mov esi, eax
mov dword [esp + 0x10], esi
test esi, esi
jne 0x4acca6
push 4
call fcn.004a78d0
mov eax, dword [esp + 0x2c]
mov byte [edi + esi], al
shr eax, 8
mov byte [edi + esi + 1], al
movzx ebx, word [ebp + 0x22]
add edi, 2
test esi, esi
jne 0x4accd6
push 0x400
mov dword [esp + 0x18], 0x400
call fcn.004b1137
add esp, 4
jmp 0x4accf8
mov edx, dword [esp + 0x14]
add edx, 0xfffffffd
cmp edi, edx
jbe 0x4acd09
mov eax, dword [esp + 0x14]
add eax, 0x400
push eax
push esi
mov dword [esp + 0x1c], eax
call fcn.004b128f
add esp, 8
mov esi, eax
mov dword [esp + 0x10], esi
test esi, esi
jne 0x4acd09
push 4
call fcn.004a78d0
mov byte [edi + esi], bl
shr ebx, 8
mov byte [edi + esi + 1], bl
add edi, 2
cmp dword [esp + 0x20], 0
mov dword [esp + 0x18], edi
je 0x4acd2d
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x18]
push eax
push ecx
jmp 0x4acd96
mov edx, 0xff00
test word [ebp], dx
jne 0x4acd8c
mov esi, dword [esp + 0x1c]
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4acd41
sub eax, edx
inc eax
push eax
call fcn.004b1137
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x4acd61
push 4
call fcn.004a78d0
push ebx
push esi
call dword [sym.imp.USER32.dll_CharToOemA]
movzx edi, word [esp + 0x2c]
lea eax, [esp + 0x18]
push eax
push ebx
lea edx, [esp + 0x1c]
lea esi, [esp + 0x18]
call fcn.004a9ea0
push ebx
call fcn.004b1201
add esp, 4
jmp 0x4acda8
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x18]
push ecx
push edx
movzx edi, word [esp + 0x34]
lea edx, [esp + 0x1c]
lea esi, [esp + 0x18]
call fcn.004a9ea0
movzx eax, word [ebp + 0x22]
test ax, ax
je 0x4acdca
mov edx, dword [ebp + 0x40]
lea ecx, [esp + 0x18]
push ecx
movzx edi, ax
push edx
lea edx, [esp + 0x1c]
lea esi, [esp + 0x18]
call fcn.004a9ea0
mov edi, dword [esp + 0x18]
mov esi, dword [esp + 0x10]
mov eax, 1
cmp dword [esp + 0x30], eax
jne 0x4ace95
cmp dword [0x509850], eax
jne 0x4ace68
mov ecx, dword [0x509838]
push ecx
push edi
push eax
push esi
call fcn.004b39f8
add esp, 0x10
cmp eax, edi
je 0x4ace2c
push esi
call fcn.004b1201
mov eax, dword [0x508354]
add esp, 4
push eax
push 0
push eax
push 0
mov ecx, 0x508304
call fcn.0042d370
pop edi
pop esi
pop ebp
mov eax, 0xa
pop ebx
add esp, 0x18
ret 8
mov eax, dword [0x509808]
cmp eax, dword [0x50980c]
je 0x4acea6
mov edx, dword [0x50982c]
mov ecx, dword [0x509838]
push edx
push ecx
push eax
call fcn.004387a0
mov edx, dword [0x50982c]
push edx
mov dword [0x509838], 0
call fcn.004b1201
add esp, 4
jmp 0x4acea6
mov ecx, dword [0x5097dc]
push ecx
push edi
push eax
push esi
call fcn.004b39f8
add esp, 0x10
cmp eax, edi
je 0x4acea6
push esi
call fcn.004b1201
mov eax, dword [0x5097d8]
add esp, 4
test eax, eax
je 0x4ace1d
jmp 0x4ace0d
push eax
push edi
push eax
push esi
call fcn.004387e0
cmp eax, edi
jne 0x4acdff
push esi
call fcn.004b1201
add esp, 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x18
ret 8