Function at 0x402850
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42b55d
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x60
push ebx
mov bl, dl
mov dword [ebp - 0x14], ecx
push esi
mov edx, ecx
lea ecx, [ebp - 0x68]
push edi
call fcn.00403b20
lea ecx, [ebp - 0xd]
mov dword [ebp - 4], 0
call fcn.004030b0
mov byte [ebp - 4], 1
mov edi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
push 0xfffffffffffffff5
call edi
lea ecx, [ebp - 0x1c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
mov cl, bl
mov esi, eax
call fcn.00402b60
test esi, esi
je 0x4029a7
lea edx, [ebp - 0x68]
lea ecx, [ebp - 0x38]
call fcn.00403be0
mov byte [ebp - 4], 2
lea edx, [ebp - 0x38]
cmp dword [ebp - 0x24], 8
mov ecx, dword [ebp - 0x38]
jb 0x4028d3
mov edx, ecx
mov eax, dword [ebp - 0x28]
lea eax, [edx + eax*2]
lea edx, [ebp - 0x38]
jb 0x4028e0
mov edx, ecx
push ecx
push eax
push edx
lea ecx, [ebp - 0x50]
call fcn.0040bd40
mov ecx, dword [ebp - 0x24]
cmp ecx, 8
jb 0x402925
mov edx, dword [ebp - 0x38]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40291b
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402a9a
push ecx
push edx
call fcn.0040fc8f
add esp, 8
push 0xfffffffffffffff5
call edi
mov edx, dword [ebp - 0x3c]
lea ebx, [ebp - 0x50]
mov edi, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x50]
mov dword [ebp - 0x14], eax
cmp edx, 8
jb 0x40293f
mov ebx, ecx
test edi, edi
je 0x402971
mov esi, edi
cmp edi, 0x1000
jb 0x402952
mov esi, 0x1000
push 0
lea ecx, [ebp - 0x18]
push ecx
push esi
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
mov eax, dword [ebp - 0x14]
lea ebx, [ebx + esi*2]
sub edi, esi
jne 0x402943
mov edx, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x50]
cmp edx, 8
jb 0x4029e7
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40299b
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402a9f
push edx
push ecx
call fcn.0040fc8f
add esp, 8
jmp 0x4029e7
push 0xfffffffffffffff5
call edi
mov ebx, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
cmp dword [ebx + 0x14], 0x10
mov edi, dword [ebx + 0x10]
jb 0x4029bc
mov ebx, dword [ebx]
test edi, edi
je 0x4029e7
mov esi, edi
cmp edi, 0x1000
jb 0x4029cf
mov esi, 0x1000
push 0
lea ecx, [ebp - 0x20]
push ecx
push esi
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x18]
add ebx, esi
sub edi, esi
jne 0x4029c0
push ecx
call fcn.00409610
mov eax, dword fs:[0x2c]
mov esi, dword [ebp - 0x58]
mov ecx, dword [eax]
mov eax, dword [0x43ad78]
cmp eax, dword [ecx + 4]
jle 0x402a44
push 0x43ad78
call fcn.0040f895
add esp, 4
cmp dword [0x43ad78], 0xffffffff
jne 0x402a44
push 0x102
push 0x43ad44
call fcn.0040f05f
push 0x42c180
call fcn.0040fc7a
add esp, 0xc
push 0x43ad78
call fcn.0040f844
add esp, 4
push 0x43ad44
call fcn.0040f090
mov ecx, dword [ebp - 0x54]
add esp, 4
cmp ecx, 4
jb 0x402a87
mov edx, dword [ebp - 0x68]
lea ecx, [ecx*4 + 4]
mov eax, edx
cmp ecx, 0x1000
jb 0x402a7d
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402aa4
push ecx
push edx
call fcn.0040fc8f
add esp, 8
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.00417563
call fcn.00417563
call fcn.00417563
int3