Function at 0x4bbab0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x18
mov ecx, dword [0x4e8f34]
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 0x4bbb40
mov dword [0x51fc74], ebx
cmp dword [ebp + 0x14], ebx
ja 0x4bbb12
mov eax, 0x7fffffff
jb 0x4bbafe
cmp dword [ebp + 0x10], eax
ja 0x4bbb12
cmp dword [ebp + 0x1c], ebx
ja 0x4bbb12
jb 0x4bbb0a
cmp dword [ebp + 0x18], eax
ja 0x4bbb12
cmp ecx, edi
jne 0x4bbc12
cmp ecx, ebx
jne 0x4bbb1d
push 6
call fcn.004b6c10
mov dword [0x51fc74], edi
mov dword [0x51fc78], edi
cmp word [ebp + 2], 0x2d
jae 0x4bbb39
mov ecx, 0x2d
mov word [ebp + 2], cx
mov esi, edi
jmp 0x4bbbfa
mov esi, dword [0x51fc74]
mov dword [0x51fc74], ebx
cmp dword [ebp + 0x14], ebx
ja 0x4bbb6d
mov eax, 0x7fffffff
jb 0x4bbb5d
cmp dword [ebp + 0x10], eax
ja 0x4bbb6d
cmp dword [ebp + 0x1c], ebx
ja 0x4bbb6d
jb 0x4bbb69
cmp dword [ebp + 0x18], eax
ja 0x4bbb6d
cmp ecx, edi
jne 0x4bbbac
mov eax, edi
mov dword [0x51fc74], eax
cmp esi, ebx
jne 0x4bbb97
cmp dword [ebp + 0x14], ebx
ja 0x4bbb97
jb 0x4bbb84
cmp dword [ebp + 0x10], edx
ja 0x4bbb97
cmp dword [ebp + 0x1c], ebx
ja 0x4bbb97
jb 0x4bbb90
cmp dword [ebp + 0x18], edx
ja 0x4bbb97
xor eax, eax
mov dword [0x51fc74], eax
cmp ecx, ebx
jne 0x4bbbac
cmp eax, ebx
je 0x4bbbac
push 6
call fcn.004b6c10
mov ecx, dword [0x4e8f34]
cmp esi, ebx
jne 0x4bbbbf
cmp dword [0x51fc74], edi
jne 0x4bbbbf
push 6
call fcn.004b6c10
cmp dword [0x51fc74], ebx
je 0x4bbbdf
mov dword [0x51fc78], edi
cmp word [ebp + 2], 0x2d
jae 0x4bbbe5
mov edx, 0x2d
mov word [ebp + 2], dx
jmp 0x4bbbe5
mov dword [0x51fc74], ebx
cmp esi, ebx
je 0x4bbbfa
cmp dword [0x51fc74], edi
je 0x4bbbfa
mov eax, 0x14
mov word [ebp + 2], ax
cmp dword [0x51fc74], ebx
jne 0x4bbc06
cmp esi, ebx
je 0x4bbc12
mov edi, ebp
call fcn.004b9b70
mov edi, 1
cmp dword [ebp + 0x58], ebx
je 0x4bbc8b
cmp dword [0x51fc80], ebx
jne 0x4bbc27
cmp dword [0x51fc44], ebx
je 0x4bbc36
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 0x4bbc82
movzx eax, word [esp + 0x2c]
cdq
sub dword [0x51e808], eax
mov dword [esp + 0x20], edi
sbb dword [0x51e80c], edx
mov eax, dword [ebp + 0x58]
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4bbc60
sub eax, edx
movzx eax, ax
mov dword [esp + 0x2c], eax
movzx eax, ax
cdq
add dword [0x51e808], eax
adc dword [0x51e80c], edx
jmp 0x4bbc9a
mov edi, ebp
call fcn.004b9d50
jmp 0x4bbc9a
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 0x4bbcae
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.004b9040
movzx edx, word [ebp + 2]
mov esi, dword [esp + 0x10]
mov edi, dword [esp + 0x18]
mov dword [esp + 0x24], edx
cmp esi, ebx
jne 0x4bbcec
mov ebx, 0x400
push ebx
mov dword [esp + 0x18], ebx
call fcn.004c0bc4
add esp, 4
jmp 0x4bbd0b
mov ebx, dword [esp + 0x14]
lea eax, [ebx - 3]
cmp edi, eax
jbe 0x4bbd1c
add ebx, 0x400
push ebx
push esi
mov dword [esp + 0x1c], ebx
call fcn.004bff92
add esp, 8
mov esi, eax
mov dword [esp + 0x10], esi
test esi, esi
jne 0x4bbd1c
push 4
call fcn.004b6c10
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 0x4bbd4d
mov ebx, 0x400
push ebx
mov dword [esp + 0x18], ebx
call fcn.004c0bc4
add esp, 4
jmp 0x4bbd68
lea ecx, [ebx - 3]
cmp edi, ecx
jbe 0x4bbd7d
add ebx, 0x400
push ebx
push esi
mov dword [esp + 0x1c], ebx
call fcn.004bff92
add esp, 8
mov esi, eax
mov dword [esp + 0x10], esi
test esi, esi
jne 0x4bbd79
push 4
call fcn.004b6c10
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 0x4bbdad
push 0x400
mov dword [esp + 0x18], 0x400
call fcn.004c0bc4
add esp, 4
jmp 0x4bbdc8
lea eax, [ebx - 3]
cmp edi, eax
jbe 0x4bbdd9
add ebx, 0x400
push ebx
push esi
mov dword [esp + 0x1c], ebx
call fcn.004bff92
add esp, 8
mov esi, eax
mov dword [esp + 0x10], esi
test esi, esi
jne 0x4bbdd9
push 4
call fcn.004b6c10
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.004b9040
mov eax, dword [ebp + 0xc]
lea ecx, [esp + 0x14]
call fcn.004b9040
cmp dword [0x51fc74], 0
lea ecx, [esp + 0x14]
je 0x4bbe28
or eax, 0xffffffff
call fcn.004b9040
or eax, 0xffffffff
jmp 0x4bbe33
mov eax, dword [ebp + 0x10]
call fcn.004b9040
mov eax, dword [ebp + 0x18]
lea ecx, [esp + 0x14]
lea edi, [esp + 0x18]
lea esi, [esp + 0x10]
call fcn.004b9040
mov esi, dword [esp + 0x10]
mov edi, dword [esp + 0x18]
test esi, esi
jne 0x4bbe67
push 0x400
mov dword [esp + 0x18], 0x400
call fcn.004c0bc4
add esp, 4
jmp 0x4bbe85
mov eax, dword [esp + 0x14]
lea ecx, [eax - 3]
cmp edi, ecx
jbe 0x4bbe96
add eax, 0x400
push eax
push esi
mov dword [esp + 0x1c], eax
call fcn.004bff92
add esp, 8
mov esi, eax
mov dword [esp + 0x10], esi
test esi, esi
jne 0x4bbe96
push 4
call fcn.004b6c10
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 0x4bbec6
push 0x400
mov dword [esp + 0x18], 0x400
call fcn.004c0bc4
add esp, 4
jmp 0x4bbee8
mov edx, dword [esp + 0x14]
add edx, 0xfffffffd
cmp edi, edx
jbe 0x4bbef9
mov eax, dword [esp + 0x14]
add eax, 0x400
push eax
push esi
mov dword [esp + 0x1c], eax
call fcn.004bff92
add esp, 8
mov esi, eax
mov dword [esp + 0x10], esi
test esi, esi
jne 0x4bbef9
push 4
call fcn.004b6c10
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 0x4bbf1d
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x18]
push eax
push ecx
jmp 0x4bbf86
mov edx, 0xff00
test word [ebp], dx
jne 0x4bbf7c
mov esi, dword [esp + 0x1c]
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4bbf31
sub eax, edx
inc eax
push eax
call fcn.004c0bc4
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x4bbf51
push 4
call fcn.004b6c10
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.004b9140
push ebx
call fcn.004bff04
add esp, 4
jmp 0x4bbf98
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.004b9140
movzx eax, word [ebp + 0x22]
test ax, ax
je 0x4bbfba
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.004b9140
mov edi, dword [esp + 0x18]
mov esi, dword [esp + 0x10]
mov eax, 1
cmp dword [esp + 0x30], eax
jne 0x4bc083
cmp dword [0x51fd00], eax
jne 0x4bc055
mov ecx, dword [0x51fce8]
push ecx
push edi
push eax
push esi
call fcn.004c2576
add esp, 0x10
cmp eax, edi
je 0x4bc01a
push esi
call fcn.004bff04
mov edx, dword [0x51e804]
add esp, 4
push edx
push 0
mov ecx, 0x51e7a8
call fcn.00433810
pop edi
pop esi
pop ebp
mov eax, 0xa
pop ebx
add esp, 0x18
ret 8
mov eax, dword [0x51fcb8]
cmp eax, dword [0x51fcbc]
je 0x4bc094
mov ecx, dword [0x51fcdc]
mov edx, dword [0x51fce8]
push ecx
push edx
push eax
call fcn.0043e880
mov eax, dword [0x51fcdc]
push eax
mov dword [0x51fce8], 0
call fcn.004bff04
add esp, 4
jmp 0x4bc094
mov ecx, dword [0x51fc8c]
push ecx
push edi
push eax
push esi
call fcn.004c2576
add esp, 0x10
cmp eax, edi
je 0x4bc094
push esi
call fcn.004bff04
mov eax, dword [0x51fc88]
add esp, 4
test eax, eax
je 0x4bc00b
push eax
jmp 0x4bbfff
push eax
push edi
push eax
push esi
call fcn.0043e8c0
cmp eax, edi
jne 0x4bbfef
push esi
call fcn.004bff04
add esp, 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x18
ret 8