Function at 0x4c0c40
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x62c886
mov eax, dword fs:[0]
push eax
mov eax, 0xc874
call fcn.005a5610
mov eax, dword [0x6bd4d8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ecx, 0x7528bd
call fcn.00627a20
mov eax, dword [0x74c480]
test eax, eax
je 0x4c1587
cmp dword [eax + 4], 3
je 0x4c0cbc
call fcn.0062148e
cmp edx, dword [0x717d94]
jl 0x4c1587
jg 0x4c0cad
cmp eax, dword [0x717d90]
jb 0x4c1587
call fcn.004c0b60
call fcn.004c4440
jmp 0x4c1587
mov edi, 0x1000
push 0x8848
lea eax, [ebp - 0x8860]
mov esi, 3
push 0
push eax
call fcn.005e07d0
xorps xmm0, xmm0
add esp, 0xc
movups xmmword [ebp - 0x8870], xmm0
mov word [ebp - 0x8862], si
lea eax, [ebp - 0x834]
mov dword [ebp - 0x885c], 0
mov dword [ebp - 0x8860], eax
lea eax, [ebp - 0x820]
mov dword [ebp - 0x8858], eax
movups xmmword [ebp - 0x8854], xmm0
mov dword [ebp - 0x8844], 0x800
lea eax, [ebp - 0x8838]
mov dword [ebp - 0x8840], 0
mov dword [ebp - 0x82c], eax
lea eax, [ebp - 0x838]
mov dword [ebp - 0x828], eax
lea eax, [ebp - 0x8838]
mov dword [ebp - 0x834], eax
lea eax, [ebp - 0x818]
mov dword [ebp - 0x820], eax
lea eax, [ebp - 0x18]
mov dword [ebp - 0x883c], 0
mov dword [ebp - 0x830], 0x8000
mov dword [ebp - 0x824], 0
mov dword [ebp - 0x8838], 0x7ff4
mov dword [ebp - 0x8834], 0
mov dword [ebp - 0x8830], 0
mov dword [ebp - 0x81c], eax
lea eax, [ebp - 0x8870]
mov dword [ebp - 4], 2
mov ecx, dword [0x74c480]
push eax
call fcn.004c4940
test al, al
je 0x4c1351
push 0x67e558
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0
push eax
lea ecx, [ebp - 0x8870]
call fcn.004c2090
mov eax, dword [ebp - 0x8870]
mov ecx, dword [ebp - 0x14]
shl eax, 5
add eax, dword [ebp - 0x8868]
cmp ecx, eax
je 0x4c0e0b
mov ax, word [ecx + 0x1e]
shr ax, 0xa
test al, 1
je 0x4c0e0b
test word [ecx + 0x1e], di
lea esi, [ecx + 0x10]
jne 0x4c0e0d
mov esi, dword [esi + 8]
jmp 0x4c0e0d
xor esi, esi
push str.nonce
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0
push eax
lea ecx, [ebp - 0x8870]
call fcn.004c2090
mov eax, dword [ebp - 0x8870]
mov ecx, dword [ebp - 0x14]
shl eax, 5
add eax, dword [ebp - 0x8868]
cmp ecx, eax
je 0x4c0f36
mov ax, word [ecx + 0x1e]
shr ax, 0xa
test al, 1
je 0x4c0f36
add ecx, 0x10
test word [ecx + 0xe], di
jne 0x4c0e5e
mov ecx, dword [ecx + 8]
test ecx, ecx
je 0x4c0f36
test esi, esi
je 0x4c12cf
mov eax, str.ERROR
mov cl, byte [esi]
cmp cl, byte [eax]
jne 0x4c0e93
test cl, cl
je 0x4c0e8f
mov cl, byte [esi + 1]
cmp cl, byte [eax + 1]
jne 0x4c0e93
add esi, 2
add eax, 2
test cl, cl
jne 0x4c0e73
xor eax, eax
jmp 0x4c0e98
sbb eax, eax
or eax, 1
test eax, eax
jne 0x4c12cf
mov dword [ebp - 0x14], eax
lea ecx, [ebp - 0x8870]
push str.data
lea eax, [ebp - 0x14]
push eax
call fcn.004c2090
mov eax, dword [ebp - 0x8870]
mov ecx, dword [ebp - 0x14]
shl eax, 5
add eax, dword [ebp - 0x8868]
cmp ecx, eax
je 0x4c0ed9
cmp word [ecx + 0x1e], 3
jne 0x4c0ed9
lea esi, [ecx + 0x10]
jmp 0x4c0edb
xor esi, esi
push ecx
mov ecx, esi
call fcn.004c09f0
push 0x66c47e
mov edx, str.message
mov ecx, esi
call fcn.004c0a70
mov esi, eax
add esp, 8
test esi, esi
je 0x4c0f28
mov dl, byte [esi]
mov ecx, 0x74c380
test dl, dl
je 0x4c0f25
mov edi, 1
sub edi, ecx
sub esi, ecx
lea eax, [ecx + edi]
cmp eax, 0x100
jae 0x4c0f25
mov byte [ecx], dl
inc ecx
mov dl, byte [ecx + esi]
test dl, dl
jne 0x4c0f11
mov byte [ecx], 0
mov al, 1
mov ecx, 0x74815e
xchg byte [ecx], al
jmp 0x4c12cf
test esi, esi
jne 0x4c0fb5
mov eax, dword [ebp - 0x834]
test eax, eax
je 0x4c0f71
cmp eax, dword [ebp - 0x82c]
je 0x4c0f66
mov esi, dword [eax + 8]
push eax
call fcn.005f4b0e
add esp, 4
mov eax, esi
mov dword [ebp - 0x834], eax
test esi, esi
jne 0x4c0f44
jmp 0x4c0f71
test eax, eax
je 0x4c0f71
mov dword [eax + 4], 0
push 1
push dword [ebp - 0x824]
call fcn.005a48cc
mov esi, dword [ebp - 0x885c]
add esp, 8
test esi, esi
je 0x4c0f9d
mov ecx, esi
call fcn.004c2030
push 0x14
push esi
call fcn.005a48cc
add esp, 8
push 0x808
push dword [ebp - 0x8854]
call fcn.005a48cc
add esp, 8
jmp 0x4c0cc1
push str.data
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0
push eax
lea ecx, [ebp - 0x8870]
call fcn.004c2090
mov eax, dword [ebp - 0x8870]
mov ecx, dword [ebp - 0x14]
shl eax, 5
add eax, dword [ebp - 0x8868]
cmp ecx, eax
je 0x4c0ff2
cmp word [ecx + 0x1e], 3
jne 0x4c0ff2
lea edi, [ecx + 0x10]
jmp 0x4c0ff4
xor edi, edi
mov ecx, str.ACTIVITY_JOIN
mov eax, esi
nop dword [eax + eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4c1020
test dl, dl
je 0x4c101c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4c1020
add eax, 2
add ecx, 2
test dl, dl
jne 0x4c1000
xor eax, eax
jmp 0x4c1025
sbb eax, eax
or eax, 1
test eax, eax
jne 0x4c107a
push eax
mov edx, str.secret
mov ecx, edi
call fcn.004c0a70
mov ecx, eax
add esp, 4
test ecx, ecx
je 0x4c12cf
cmp byte [ecx], 0
mov edx, 0x748160
je 0x4c1069
mov esi, 1
sub esi, ecx
lea eax, [esi + ecx]
cmp eax, 0x100
jae 0x4c1069
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
cmp byte [ecx], 0
jne 0x4c1054
mov byte [edx], 0
mov al, 1
mov ecx, 0x747f27
xchg byte [ecx], al
jmp 0x4c12cf
mov ecx, str.ACTIVITY_SPECTATE
mov eax, esi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4c10a1
test dl, dl
je 0x4c109d
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4c10a1
add eax, 2
add ecx, 2
test dl, dl
jne 0x4c1081
xor eax, eax
jmp 0x4c10a6
sbb eax, eax
or eax, 1
test eax, eax
jne 0x4c10fb
push eax
mov edx, str.secret
mov ecx, edi
call fcn.004c0a70
mov ecx, eax
add esp, 4
test ecx, ecx
je 0x4c12cf
cmp byte [ecx], 0
mov edx, 0x74c490
je 0x4c10ea
mov esi, 1
sub esi, ecx
lea eax, [esi + ecx]
cmp eax, 0x100
jae 0x4c10ea
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
cmp byte [ecx], 0
jne 0x4c10d5
mov byte [edx], 0
mov al, 1
mov ecx, 0x74815d
xchg byte [ecx], al
jmp 0x4c12cf
mov eax, str.ACTIVITY_JOIN_REQUEST
mov cl, byte [esi]
cmp cl, byte [eax]
jne 0x4c1120
test cl, cl
je 0x4c111c
mov cl, byte [esi + 1]
cmp cl, byte [eax + 1]
jne 0x4c1120
add esi, 2
add eax, 2
test cl, cl
jne 0x4c1100
xor eax, eax
jmp 0x4c1125
sbb eax, eax
or eax, 1
test eax, eax
jne 0x4c12cf
test edi, edi
je 0x4c115f
mov dword [ebp - 0x14], eax
mov ecx, edi
push str.user
lea eax, [ebp - 0x14]
push eax
call fcn.004c2090
mov eax, dword [edi]
mov ecx, dword [ebp - 0x14]
shl eax, 5
add eax, dword [edi + 8]
cmp ecx, eax
je 0x4c115f
cmp word [ecx + 0x1e], 3
jne 0x4c115f
lea esi, [ecx + 0x10]
jmp 0x4c1161
xor esi, esi
push 0
mov edx, 0x67e594
mov dword [ebp - 0xc878], esi
mov ecx, esi
call fcn.004c0a70
push 0
mov edx, str.username
mov dword [ebp - 0xc87c], eax
mov ecx, esi
call fcn.004c0a70
push 0
mov edx, str.avatar
mov ecx, esi
mov edi, eax
call fcn.004c0a70
mov ecx, dword [0x717d58]
mov esi, eax
add esp, 0xc
mov dword [ebp - 0xc880], esi
nop
cmp ecx, 8
jb 0x4c11b4
xor eax, eax
jmp 0x4c11ce
mov eax, 1
lock xadd dword [0x717d50], eax
inc eax
dec eax
and eax, 7
shl eax, 9
add eax, 0x716d50
mov ecx, dword [ebp - 0xc87c]
mov dword [ebp - 0x14], eax
test ecx, ecx
je 0x4c12cf
test edi, edi
je 0x4c12cf
test eax, eax
je 0x4c12cf
cmp byte [ecx], 0
mov edx, eax
je 0x4c121c
mov esi, 1
sub esi, ecx
nop dword [eax]
lea eax, [esi + ecx]
cmp eax, 0x20
jae 0x4c1213
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
cmp byte [ecx], 0
jne 0x4c1200
mov esi, dword [ebp - 0xc880]
mov eax, dword [ebp - 0x14]
mov byte [edx], 0
lea edx, [eax + 0x20]
cmp byte [edi], 0
je 0x4c1245
mov ecx, 1
sub ecx, edi
nop
lea eax, [ecx + edi]
cmp eax, 0x158
jae 0x4c1245
mov al, byte [edi]
inc edi
mov byte [edx], al
inc edx
cmp byte [edi], 0
jne 0x4c1230
mov ecx, dword [ebp - 0xc878]
mov byte [edx], 0
mov edx, str.discriminator
push 0
call fcn.004c0a70
mov ecx, eax
add esp, 4
test ecx, ecx
je 0x4c128e
mov edx, dword [ebp - 0x14]
add edx, 0x178
cmp byte [ecx], 0
je 0x4c128b
mov edi, 1
sub edi, ecx
lea eax, [edi + ecx]
cmp eax, 8
jae 0x4c128b
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
cmp byte [ecx], 0
jne 0x4c1278
mov byte [edx], 0
mov ecx, dword [ebp - 0x14]
add ecx, 0x180
test esi, esi
je 0x4c12c5
cmp byte [esi], 0
je 0x4c12c5
mov edx, 1
sub edx, esi
nop word [eax + eax]
lea eax, [edx + esi]
cmp eax, 0x80
jae 0x4c12c5
mov al, byte [esi]
inc esi
mov byte [ecx], al
inc ecx
cmp byte [esi], 0
jne 0x4c12b0
mov byte [ecx], 0
lock inc dword [0x717d58]
mov eax, dword [ebp - 0x834]
test eax, eax
je 0x4c130d
nop dword [eax]
cmp eax, dword [ebp - 0x82c]
je 0x4c1302
mov esi, dword [eax + 8]
push eax
call fcn.005f4b0e
add esp, 4
mov eax, esi
mov dword [ebp - 0x834], eax
test esi, esi
jne 0x4c12e0
jmp 0x4c130d
test eax, eax
je 0x4c130d
mov dword [eax + 4], 0
push 1
push dword [ebp - 0x824]
call fcn.005a48cc
mov esi, dword [ebp - 0x885c]
add esp, 8
test esi, esi
je 0x4c1339
mov ecx, esi
call fcn.004c2030
push 0x14
push esi
call fcn.005a48cc
add esp, 8
push 0x808
push dword [ebp - 0x8854]
call fcn.005a48cc
add esp, 8
jmp 0x4c0cbc
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x834]
test eax, eax
je 0x4c1395
mov ecx, dword [ebp - 0x82c]
cmp eax, ecx
je 0x4c1386
mov esi, dword [eax + 8]
push eax
call fcn.005f4b0e
add esp, 4
mov eax, esi
mov dword [ebp - 0x834], eax
test esi, esi
jne 0x4c1362
jmp 0x4c1395
test eax, eax
je 0x4c1395
cmp eax, ecx
jne 0x4c1395
mov dword [eax + 4], 0
push 1
push dword [ebp - 0x824]
call fcn.005a48cc
mov esi, dword [ebp - 0x885c]
add esp, 8
test esi, esi
je 0x4c13c1
mov ecx, esi
call fcn.004c2030
push 0x14
push esi
call fcn.005a48cc
add esp, 8
push 0x808
push dword [ebp - 0x8854]
call fcn.005a48cc
add esp, 8
xor al, al
mov edi, 0x74815c
xchg byte [edi], al
test al, al
je 0x4c149a
cmp dword [0x748378], 0
je 0x4c149a
push 0x717d5c
call fcn.00620f7a
add esp, 4
test eax, eax
jne 0x4c15a2
mov esi, dword [0x748378]
mov dword [ebp - 0xc874], esi
test esi, esi
je 0x4c1432
push esi
lea eax, [ebp - 0xc870]
push 0x74837c
push eax
call fcn.005e01a0
mov esi, dword [ebp - 0xc874]
add esp, 0xc
push 0x717d5c
call fcn.00620f9f
add esp, 4
lea eax, [ebp - 0xc870]
push esi
push eax
call fcn.004c48d0
test al, al
jne 0x4c149a
push 0x717d5c
call fcn.00620f7a
add esp, 4
test eax, eax
jne 0x4c15a8
mov eax, dword [ebp - 0xc874]
mov dword [0x748378], eax
test eax, eax
je 0x4c1489
push eax
lea eax, [ebp - 0xc870]
push eax
push 0x74837c
call fcn.005e01a0
add esp, 0xc
mov al, 1
xchg byte [edi], al
push 0x717d5c
call fcn.00620f9f
add esp, 4
mov eax, dword [0x737dc8]
nop
test eax, eax
je 0x4c1587
nop dword [eax + eax]
mov eax, 1
lock xadd dword [0x737dc4], eax
inc eax
mov edi, dword [0x74c480]
dec eax
and eax, 7
imul eax, eax, 0x4004
add eax, 0x717da0
mov esi, dword [eax]
add eax, 4
push esi
push eax
lea eax, [edi + 0x15c]
mov dword [edi + 0x154], 1
push eax
call fcn.005e01a0
add esp, 0xc
mov dword [edi + 0x158], esi
add esi, 8
je 0x4c1572
mov eax, dword [edi]
test eax, eax
je 0x4c1536
mov ecx, dword [eax + 4]
cmp ecx, 0xffffffff
je 0x4c1536
lea eax, [edi + 0x154]
test eax, eax
je 0x4c1536
push 0
lea edx, [ebp - 0x18]
mov dword [ebp - 0x18], 0
push edx
push esi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, 1
jne 0x4c1536
cmp dword [ebp - 0x18], esi
je 0x4c1572
mov ecx, dword [edi + 0xc]
test ecx, ecx
je 0x4c1556
mov eax, dword [edi + 4]
cmp eax, 3
je 0x4c154a
cmp eax, 1
jne 0x4c1556
lea eax, [edi + 0x54]
push eax
push dword [edi + 0x50]
call ecx
add esp, 8
mov esi, dword [edi]
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 4], 0xffffffff
mov byte [esi], 0
mov dword [edi + 4], 0
lock dec dword [0x737dc8]
mov eax, dword [0x737dc8]
nop
test eax, eax
jne 0x4c14b0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005a489b
mov esp, ebp
pop ebp
ret
push eax
call fcn.00621239
push eax
call fcn.00621239
int3