Function at 0x4c1590
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x607cf2
mov eax, dword fs:[0]
push eax
sub esp, 0x224
mov eax, dword [0x698b9c]
xor eax, ebp
mov dword [ebp - 0x30], eax
push ebx
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x224], ecx
cmp dword [ebp + 0x14], 0
je 0x4c15d8
mov ecx, dword [ebp + 0x14]
add ecx, 4
call fcn.00459250
cmp eax, 1
jae 0x4c15dd
jmp case.0x4c162b.1
mov eax, dword [ebp + 0x14]
push eax
lea ecx, [ebp - 0x1c]
call fcn.004c7f30
lea ecx, [ebp - 0xd]
push ecx
lea ecx, [ebp - 0x1c]
call fcn.004c7f70
movzx edx, byte [ebp - 0xd]
mov dword [ebp - 0x228], edx
mov eax, dword [ebp - 0x228]
sub eax, 2
mov dword [ebp - 0x228], eax
cmp dword [ebp - 0x228], 0xfd
ja case.0x4c162b.1
mov ecx, dword [ebp - 0x228]
movzx edx, byte [ecx + 0x4c1e28]
jmp dword [edx*4 + 0x4c1df4]
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x1c]
call fcn.004c8060
test eax, eax
je 0x4c165f
push 1
push 0
mov ecx, dword [ebp - 0x20]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov ecx, dword [ebp - 0x224]
add ecx, 0xb8
call fcn.004cbc40
jmp case.0x4c162b.1
cmp dword [0x69c110], 0
je 0x4c1672
jmp case.0x4c162b.1
mov byte [ebp - 0x21], 0
mov eax, dword [ebp - 0x224]
mov cl, byte [eax + 0x13e]
mov byte [ebp - 0x22], cl
mov edx, dword [ebp - 0x224]
mov al, byte [edx + 0x13f]
mov byte [ebp - 0x23], al
lea ecx, [ebp - 0x21]
push ecx
lea ecx, [ebp - 0x1c]
call fcn.004c7f70
movzx edx, byte [ebp - 0x21]
test edx, edx
jne 0x4c1731
lea eax, [ebp - 0x22]
push eax
lea ecx, [ebp - 0x1c]
call fcn.004c7f70
lea ecx, [ebp - 0x23]
push ecx
lea ecx, [ebp - 0x1c]
call fcn.004c7f70
push 0x698ac0
lea ecx, [ebp - 0x1c]
call fcn.004c7fc0
push 0x698abc
lea ecx, [ebp - 0x1c]
call fcn.004c7f70
push 0x698abd
lea ecx, [ebp - 0x1c]
call fcn.004c7f70
push 0x698ac4
lea ecx, [ebp - 0x1c]
call fcn.004c8010
mov edx, dword [0x698ac4]
push edx
movzx eax, byte [0x698abd]
push eax
movzx ecx, byte [0x698abc]
push ecx
movzx edx, word [0x698ac0]
push edx
movzx eax, byte [ebp - 0x23]
push eax
movzx ecx, byte [ebp - 0x22]
push ecx
mov ecx, dword [ebp - 0x224]
sub ecx, 0x2c
call fcn.004c0400
jmp 0x4c1748
movzx edx, byte [ebp - 0x21]
cmp edx, 1
jne 0x4c1748
mov ecx, dword [ebp - 0x224]
sub ecx, 0x2c
call fcn.004c0600
jmp case.0x4c162b.1
cmp dword [0x69c110], 0
je 0x4c175b
jmp case.0x4c162b.1
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x1c]
call fcn.004c8060
test eax, eax
je 0x4c17cc
push 0x611d90
push 0x104
lea ecx, [ebp - 0x13c]
push ecx
call fcn.00403460
add esp, 0xc
push 0x611d9c
lea edx, [ebp - 0x13c]
push edx
call fcn.005c24a0
add esp, 8
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
je 0x4c17cc
mov eax, dword [ebp - 0x2c]
push eax
push 1
mov ecx, dword [ebp - 0x28]
push ecx
call fcn.005c0140
add esp, 4
push eax
mov edx, dword [ebp - 0x28]
push edx
call fcn.005c235a
add esp, 0x10
mov eax, dword [ebp - 0x2c]
push eax
call fcn.005c217c
add esp, 4
jmp case.0x4c162b.1
cmp dword [0x69c110], 0
je 0x4c17df
jmp case.0x4c162b.1
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
mov ecx, dword [ebp - 0x224]
sub ecx, 0x2c
call fcn.004c4150
jmp case.0x4c162b.1
mov dword [ebp - 0x144], 0
lea eax, [ebp - 0x140]
push eax
lea ecx, [ebp - 0x1c]
call fcn.004c8060
test eax, eax
jne 0x4c1823
mov dword [ebp - 0x140], 0
jmp 0x4c1840
lea ecx, [ebp - 0x144]
push ecx
lea ecx, [ebp - 0x1c]
call fcn.004c8060
test eax, eax
jne 0x4c1840
mov dword [ebp - 0x144], 0
mov edx, dword [ebp - 0x144]
push edx
call fcn.00401be0
add esp, 4
push eax
mov eax, dword [ebp - 0x140]
push eax
mov ecx, dword [ebp - 0x224]
sub ecx, 0x2c
call fcn.004c0160
jmp case.0x4c162b.1
mov ecx, dword [ebp + 0xc]
push ecx
mov ecx, dword [ebp - 0x224]
add ecx, 0xb8
call fcn.004cc1f0
jmp case.0x4c162b.1
lea edx, [ebp - 0x148]
push edx
lea ecx, [ebp - 0x1c]
call fcn.004c8060
test eax, eax
je 0x4c1990
lea ecx, [ebp - 0x168]
call fcn.004054c0
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x148]
push eax
lea ecx, [ebp - 0x168]
call fcn.00406a10
push 0
push 0x611da0
lea ecx, [ebp - 0x168]
call fcn.00405660
mov dword [ebp - 0x14c], eax
cmp dword [ebp - 0x14c], 0
je 0x4c197e
mov ecx, dword [ebp - 0x14c]
push ecx
call fcn.005c0140
add esp, 4
cmp eax, 0x11
jb 0x4c197e
mov dword [ebp - 0x16c], 0
jmp 0x4c1917
mov edx, dword [ebp - 0x16c]
add edx, 1
mov dword [ebp - 0x16c], edx
cmp dword [ebp - 0x16c], 6
jge 0x4c196f
mov eax, dword [ebp - 0x16c]
imul eax, eax, 3
mov ecx, dword [ebp - 0x14c]
movzx edx, byte [ecx + eax]
push edx
call fcn.00401890
add esp, 4
mov ebx, eax
shl ebx, 4
mov eax, dword [ebp - 0x16c]
imul eax, eax, 3
mov ecx, dword [ebp - 0x14c]
movzx edx, byte [ecx + eax + 1]
push edx
call fcn.00401890
add esp, 4
add ebx, eax
mov eax, dword [ebp - 0x16c]
mov byte [ebp + eax - 0x154], bl
jmp 0x4c1908
lea ecx, [ebp - 0x154]
push ecx
call fcn.00409ae0
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x168]
call fcn.004055a0
jmp case.0x4c162b.1
lea ecx, [ebp - 0x19c]
call fcn.004b4770
mov dword [ebp - 4], 1
lea edx, [ebp - 0x170]
push edx
lea ecx, [ebp - 0x1c]
call fcn.004c8060
test eax, eax
je 0x4c19ce
mov eax, dword [ebp - 0x170]
push eax
lea ecx, [ebp - 0x19c]
call fcn.004b5040
jmp 0x4c19db
push 0
lea ecx, [ebp - 0x19c]
call fcn.004b5040
push 0
push 0x8b
mov ecx, dword [ebp - 0x224]
sub ecx, 0x2c
call fcn.004bdc60
mov ecx, dword [ebp - 0x224]
add ecx, 0x84
call fcn.00403cf0
push eax
mov ecx, dword [ebp - 0x224]
mov edx, dword [ecx + 4]
mov eax, dword [ebp - 0x224]
mov ecx, dword [eax + 4]
mov edx, dword [edx]
mov eax, dword [edx + 0xc]
call eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x19c]
call fcn.004b4860
jmp case.0x4c162b.1
mov ecx, dword [ebp - 0x224]
mov edx, dword [ebp + 0xc]
cmp edx, dword [ecx + 0x1c4]
jne 0x4c1b28
mov ecx, dword [ebp + 0x14]
add ecx, 4
call fcn.00459250
cmp eax, 5
jbe 0x4c1b28
lea eax, [ebp - 0x1a0]
push eax
lea ecx, [ebp - 0x1c]
call fcn.004c8060
test eax, eax
je 0x4c1b28
mov ecx, dword [ebp - 0x1a0]
push ecx
lea ecx, [ebp - 0x1b8]
call fcn.00405530
mov dword [ebp - 4], 2
push 0
push str.server
lea ecx, [ebp - 0x1b8]
call fcn.00405660
mov dword [ebp - 0x1a4], eax
cmp dword [ebp - 0x1a4], 0
je 0x4c1b16
push 0x18
call fcn.005c020b
add esp, 4
mov dword [ebp - 0x220], eax
mov byte [ebp - 4], 3
cmp dword [ebp - 0x220], 0
je 0x4c1aed
mov edx, dword [ebp - 0x1a4]
push edx
mov eax, dword [ebp - 0x224]
sub eax, 0x2c
push eax
mov ecx, dword [ebp - 0x220]
call fcn.004c1f30
mov dword [ebp - 0x22c], eax
jmp 0x4c1af7
mov dword [ebp - 0x22c], 0
mov ecx, dword [ebp - 0x22c]
mov dword [ebp - 0x21c], ecx
mov byte [ebp - 4], 2
push 0
push 0
mov ecx, dword [ebp - 0x21c]
call fcn.004010c0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1b8]
call fcn.004055a0
jmp case.0x4c162b.1
lea edx, [ebp - 0x1bc]
push edx
lea ecx, [ebp - 0x1c]
call fcn.004c8060
test eax, eax
je 0x4c1c07
mov eax, dword [ebp - 0x1bc]
movsx ecx, byte [eax]
test ecx, ecx
je 0x4c1c07
lea ecx, [ebp - 0x1d4]
call fcn.004054c0
mov dword [ebp - 4], 4
mov edx, dword [ebp - 0x1bc]
push edx
lea ecx, [ebp - 0x1d4]
call fcn.00406a10
push 0
push 0x611dac
lea ecx, [ebp - 0x1d4]
call fcn.00405660
mov dword [ebp - 0x1c0], eax
mov eax, dword [ebp - 0x224]
sub eax, 0x2c
je 0x4c1bad
mov ecx, dword [ebp - 0x224]
add ecx, 0x30
mov dword [ebp - 0x230], ecx
jmp 0x4c1bb7
mov dword [ebp - 0x230], 0
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp - 0x230]
push eax
mov ecx, dword [ebp - 0x1c0]
push ecx
call fcn.004d4760
add esp, 0xc
test eax, eax
jne 0x4c1bf3
cmp dword [ebp - 0x1c0], 0
je 0x4c1bf3
push 1
mov edx, dword [ebp - 0x1c0]
push edx
mov eax, dword [ebp + 0xc]
push eax
call fcn.004d44f0
add esp, 0xc
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1d4]
call fcn.004055a0
jmp 0x4c1c13
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.004d4310
add esp, 4
jmp case.0x4c162b.1
mov edx, dword [ebp - 0x224]
mov eax, dword [ebp + 0xc]
cmp eax, dword [edx + 0x1c4]
jne 0x4c1d83
mov ecx, dword [ebp + 0x14]
add ecx, 4
call fcn.00459250
cmp eax, 5
jbe 0x4c1d83
lea ecx, [ebp - 0x1d8]
push ecx
lea ecx, [ebp - 0x1c]
call fcn.004c8060
test eax, eax
je 0x4c1d83
mov edx, dword [ebp - 0x1d8]
push edx
lea ecx, [ebp - 0x1ec]
call fcn.00405530
mov dword [ebp - 4], 5
push 0
push 0x611db0
lea ecx, [ebp - 0x1ec]
call fcn.004056a0
cmp eax, 1
jne 0x4c1cce
cmp dword [0x69c110], 0
je 0x4c1ca8
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1ec]
call fcn.004055a0
jmp case.0x4c162b.1
mov dword [0x69c110], 1
push 1
push 0x611db4
lea ecx, [ebp - 0x1ec]
call fcn.004056a0
mov dword [0x69c184], eax
jmp 0x4c1d71
cmp dword [0x69c110], 0
je 0x4c1d5d
lea ecx, [ebp - 0x218]
call fcn.004b4770
mov byte [ebp - 4], 6
push 0
push 0x611dbc
push 0x611dc0
lea ecx, [ebp - 0x218]
call fcn.004042a0
test eax, eax
je 0x4c1d2b
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x218]
call fcn.004b4860
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1ec]
call fcn.004055a0
jmp case.0x4c162b.1
mov dword [0x69c110], 0
push 0
push str.cursor
lea ecx, [ebp - 0x1ec]
call fcn.004056a0
mov dword [0x69c184], eax
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x218]
call fcn.004b4860
jmp 0x4c1d71
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1ec]
call fcn.004055a0
jmp case.0x4c162b.1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1ec]
call fcn.004055a0
mov ecx, dword [ebp - 0x224]
add ecx, 0x84
call fcn.00403cf0
push eax
mov eax, dword [ebp - 0x224]
mov ecx, dword [eax + 4]
mov edx, dword [ebp - 0x224]
mov eax, dword [edx + 4]
mov edx, dword [ecx]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
jmp case.0x4c162b.1
cmp dword [0x69544c], 0
je case.0x4c162b.1
push 0
push 0xe140
push 0x111
mov ecx, dword [ebp - 0x224]
sub ecx, 0x28
call fcn.004b2400
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop ebx
mov ecx, dword [ebp - 0x30]
xor ecx, ebp
call fcn.005bfcb8
mov esp, ebp
pop ebp
ret 0x14