Function at 0x402a10
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42ca6d
mov eax, dword fs:[0]
push eax
sub esp, 0x64
mov eax, dword [0x43e020]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov bl, dl
mov dword [ebp - 0x60], ecx
mov edx, ecx
lea ecx, [ebp - 0x58]
call fcn.00403d50
lea ecx, [ebp - 0x59]
mov dword [ebp - 4], 0
call fcn.004032d0
mov byte [ebp - 4], 1
mov edi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
push 0xfffffffffffffff5
call edi
lea ecx, [ebp - 0x68]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
mov cl, bl
mov esi, eax
call fcn.00402d40
test esi, esi
je 0x402b6f
lea edx, [ebp - 0x58]
lea ecx, [ebp - 0x28]
call fcn.00403e30
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x28]
cmp dword [ebp - 0x14], 8
mov eax, dword [ebp - 0x18]
cmovae ecx, dword [ebp - 0x28]
lea eax, [ecx + eax*2]
lea ecx, [ebp - 0x28]
cmovae ecx, dword [ebp - 0x28]
push ecx
push eax
push ecx
lea ecx, [ebp - 0x40]
call fcn.0040c270
mov ecx, dword [ebp - 0x14]
cmp ecx, 8
jb 0x402aef
mov edx, dword [ebp - 0x28]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x402ae5
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402c70
push ecx
push edx
call fcn.0041059a
add esp, 8
push 0xfffffffffffffff5
call edi
mov edx, dword [ebp - 0x2c]
lea ebx, [ebp - 0x40]
mov ecx, dword [ebp - 0x40]
cmp edx, 8
mov edi, dword [ebp - 0x30]
cmovae ebx, ecx
mov dword [ebp - 0x60], eax
test edi, edi
je 0x402b39
nop dword [eax]
mov esi, 0x1000
lea ecx, [ebp - 0x64]
push 0
cmp edi, esi
push ecx
cmovb esi, edi
push esi
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
mov eax, dword [ebp - 0x60]
lea ebx, [ebx + esi*2]
sub edi, esi
jne 0x402b10
mov edx, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x40]
cmp edx, 8
jb 0x402bb2
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x402b63
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402c75
push edx
push ecx
call fcn.0041059a
add esp, 8
jmp 0x402bb2
push 0xfffffffffffffff5
call edi
mov ebx, dword [ebp - 0x60]
mov dword [ebp - 0x64], eax
cmp dword [ebx + 0x14], 0x10
mov edi, dword [ebx + 0x10]
jb 0x402b84
mov ebx, dword [ebx]
test edi, edi
je 0x402bb2
nop dword [eax + eax]
mov esi, 0x1000
lea ecx, [ebp - 0x6c]
push 0
cmp edi, esi
push ecx
cmovb esi, edi
push esi
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x64]
add ebx, esi
sub edi, esi
jne 0x402b90
push ecx
call fcn.00409900
mov eax, dword fs:[0x2c]
mov esi, dword [ebp - 0x48]
mov ecx, dword [eax]
mov eax, dword [0x43ffa0]
cmp eax, dword [ecx + 4]
jle 0x402c0f
push 0x43ffa0
call fcn.0040ff30
add esp, 4
cmp dword [0x43ffa0], 0xffffffff
jne 0x402c0f
push 0x102
push 0x43ff6c
call fcn.0040f618
push 0x42da20
call fcn.00410585
add esp, 0xc
push 0x43ffa0
call fcn.0040fee6
add esp, 4
push 0x43ff6c
call fcn.0040f648
mov ecx, dword [ebp - 0x44]
add esp, 4
cmp ecx, 4
jb 0x402c52
mov edx, dword [ebp - 0x58]
lea ecx, [ecx*4 + 4]
mov eax, edx
cmp ecx, 0x1000
jb 0x402c48
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402c7a
push ecx
push edx
call fcn.0041059a
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040fe0e
mov esp, ebp
pop ebp
ret
call fcn.00417c53
call fcn.00417c53
call fcn.00417c53
int3