Function at 0x428a60
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xca0
mov eax, dword [0x468004]
xor eax, ebp
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 4], 0
mov eax, dword [ebp - 4]
mov dword [ebp - 0x14], eax
cmp dword [ebp + 0x10], 0
jne 0x428a9b
xor eax, eax
jmp 0x429583
xor ecx, ecx
cmp dword [ebp + 0xc], 0
setne cl
mov dword [ebp - 0x20], ecx
cmp dword [ebp - 0x20], 0
jne 0x428acb
push str._buf___NULL_
push 0
push 0x6f
push str.write.c
push 2
call fcn.00406db0
add esp, 0x14
cmp eax, 1
jne 0x428acb
int3
cmp dword [ebp - 0x20], 0
jne 0x428b0a
call fcn.00406a60
mov dword [eax], 0
call fcn.00406a30
mov dword [eax], 0x16
push 0
push 0x6f
push str.write.c
push str._write_nolock
push str._buf___NULL_
call fcn.004065a0
add esp, 0x14
or eax, 0xffffffff
jmp 0x429583
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
shl ecx, 6
mov edx, dword [eax*4 + 0x46b680]
mov al, byte [edx + ecx + 0x24]
shl al, 1
sar al, 1
mov byte [ebp - 5], al
movsx ecx, byte [ebp - 5]
cmp ecx, 2
je 0x428b3d
movsx edx, byte [ebp - 5]
cmp edx, 1
jne 0x428bac
mov eax, dword [ebp + 0x10]
and eax, 1
neg eax
sbb eax, eax
add eax, 1
mov dword [ebp - 0x24], eax
jne 0x428b6d
push str.__cnt__1___0_
push 0
push 0x77
push str.write.c
push 2
call fcn.00406db0
add esp, 0x14
cmp eax, 1
jne 0x428b6d
int3
cmp dword [ebp - 0x24], 0
jne 0x428bac
call fcn.00406a60
mov dword [eax], 0
call fcn.00406a30
mov dword [eax], 0x16
push 0
push 0x77
push str.write.c
push str._write_nolock
push str.__cnt__1___0_
call fcn.004065a0
add esp, 0x14
or eax, 0xffffffff
jmp 0x429583
mov edx, dword [ebp + 8]
sar edx, 5
mov eax, dword [ebp + 8]
and eax, 0x1f
shl eax, 6
mov ecx, dword [edx*4 + 0x46b680]
movsx edx, byte [ecx + eax + 4]
and edx, 0x20
je 0x428bde
push 2
push 0
push 0
mov eax, dword [ebp + 8]
push eax
call fcn.00428750
add esp, 0x10
mov ecx, dword [ebp + 8]
push ecx
call fcn.00429660
add esp, 4
test eax, eax
je 0x428c52
mov edx, dword [ebp + 8]
sar edx, 5
mov eax, dword [ebp + 8]
and eax, 0x1f
shl eax, 6
mov ecx, dword [edx*4 + 0x46b680]
movsx edx, byte [ecx + eax + 4]
and edx, 0x80
je 0x428c52
call fcn.00408160
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + 0x6c]
xor edx, edx
cmp dword [ecx + 0x14], 0
sete dl
mov dword [ebp - 0x1c], edx
lea eax, [ebp - 0x28]
push eax
mov ecx, dword [ebp + 8]
sar ecx, 5
mov edx, dword [ebp + 8]
and edx, 0x1f
shl edx, 6
mov eax, dword [ecx*4 + 0x46b680]
mov ecx, dword [eax + edx]
push ecx
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x429019
cmp dword [ebp - 0x1c], 0
je 0x428c6e
movsx edx, byte [ebp - 5]
test edx, edx
je 0x429019
call dword [sym.imp.KERNEL32.dll_GetConsoleCP]
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x30], eax
mov ecx, dword [ebp - 0x30]
sub ecx, dword [ebp + 0xc]
cmp ecx, dword [ebp + 0x10]
jae 0x429014
movsx edx, byte [ebp - 5]
test edx, edx
jne 0x428e47
mov eax, dword [ebp - 0x30]
movsx ecx, byte [eax]
xor edx, edx
cmp ecx, 0xa
sete dl
mov dword [ebp - 0x50], edx
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
shl ecx, 6
mov edx, dword [eax*4 + 0x46b680]
cmp dword [edx + ecx + 0x38], 0
je 0x428d85
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
shl ecx, 6
mov edx, dword [eax*4 + 0x46b680]
movsx eax, byte [edx + ecx + 0x34]
push eax
call fcn.004204b0
add esp, 4
test eax, eax
jne 0x428d21
push str.isleadbyte__dbcsBuffer_fh__
push 0
push 0xb5
push str.write.c
push 2
call fcn.00406db0
add esp, 0x14
cmp eax, 1
jne 0x428d21
int3
mov edx, dword [ebp + 8]
sar edx, 5
mov eax, dword [ebp + 8]
and eax, 0x1f
shl eax, 6
mov ecx, dword [edx*4 + 0x46b680]
mov dl, byte [ecx + eax + 0x34]
mov byte [ebp - 0x4c], dl
mov eax, dword [ebp - 0x30]
mov cl, byte [eax]
mov byte [ebp - 0x4b], cl
mov edx, dword [ebp + 8]
sar edx, 5
mov eax, dword [ebp + 8]
and eax, 0x1f
shl eax, 6
mov ecx, dword [edx*4 + 0x46b680]
mov dword [ecx + eax + 0x38], 0
push 2
lea edx, [ebp - 0x4c]
push edx
lea eax, [ebp - 0x40]
push eax
call fcn.00434680
add esp, 0xc
cmp eax, 0xffffffff
jne 0x428d80
jmp 0x429014
jmp 0x428e3c
mov ecx, dword [ebp - 0x30]
movsx edx, byte [ecx]
push edx
call fcn.004204b0
add esp, 4
test eax, eax
je 0x428e20
mov eax, dword [ebp - 0x30]
sub eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
sub ecx, eax
cmp ecx, 1
jbe 0x428dd3
push 2
mov edx, dword [ebp - 0x30]
push edx
lea eax, [ebp - 0x40]
push eax
call fcn.00434680
add esp, 0xc
cmp eax, 0xffffffff
jne 0x428dc8
jmp 0x429014
mov ecx, dword [ebp - 0x30]
add ecx, 1
mov dword [ebp - 0x30], ecx
jmp 0x428e1e
mov edx, dword [ebp + 8]
sar edx, 5
mov eax, dword [ebp + 8]
and eax, 0x1f
shl eax, 6
mov ecx, dword [edx*4 + 0x46b680]
mov edx, dword [ebp - 0x30]
mov dl, byte [edx]
mov byte [ecx + eax + 0x34], dl
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
shl ecx, 6
mov edx, dword [eax*4 + 0x46b680]
mov dword [edx + ecx + 0x38], 1
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
jmp 0x429014
jmp 0x428e3c
push 1
mov ecx, dword [ebp - 0x30]
push ecx
lea edx, [ebp - 0x40]
push edx
call fcn.00434680
add esp, 0xc
cmp eax, 0xffffffff
jne 0x428e3c
jmp 0x429014
mov eax, dword [ebp - 0x30]
add eax, 1
mov dword [ebp - 0x30], eax
jmp 0x428e7b
movsx ecx, byte [ebp - 5]
cmp ecx, 1
je 0x428e59
movsx edx, byte [ebp - 5]
cmp edx, 2
jne 0x428e7b
mov eax, dword [ebp - 0x30]
mov cx, word [eax]
mov word [ebp - 0x40], cx
movzx edx, word [ebp - 0x40]
xor eax, eax
cmp edx, 0xa
sete al
mov dword [ebp - 0x50], eax
mov ecx, dword [ebp - 0x30]
add ecx, 2
mov dword [ebp - 0x30], ecx
movsx edx, byte [ebp - 5]
test edx, edx
jne 0x428f85
push 0
push 0
push 5
lea eax, [ebp - 0x4c]
push eax
push 1
lea ecx, [ebp - 0x40]
push ecx
push 0
mov edx, dword [ebp - 0x3c]
push edx
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
jne 0x428eb3
jmp 0x429014
push 0
lea eax, [ebp - 0x34]
push eax
mov ecx, dword [ebp - 0x38]
push ecx
lea edx, [ebp - 0x4c]
push edx
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
shl ecx, 6
mov edx, dword [eax*4 + 0x46b680]
mov eax, dword [edx + ecx]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x428f00
mov ecx, dword [ebp - 0x30]
sub ecx, dword [ebp + 0xc]
add ecx, dword [ebp - 0x14]
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 0x34]
cmp edx, dword [ebp - 0x38]
jge 0x428efe
jmp 0x429014
jmp 0x428f0e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0xc], eax
jmp 0x429014
cmp dword [ebp - 0x50], 0
je 0x428f80
mov dword [ebp - 0x38], 1
mov byte [ebp - 0x4c], 0xd
push 0
lea eax, [ebp - 0x34]
push eax
mov ecx, dword [ebp - 0x38]
push ecx
lea edx, [ebp - 0x4c]
push edx
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
shl ecx, 6
mov edx, dword [eax*4 + 0x46b680]
mov eax, dword [edx + ecx]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x428f72
mov ecx, dword [ebp - 0x34]
cmp ecx, dword [ebp - 0x38]
jge 0x428f5e
jmp 0x429014
mov edx, dword [ebp - 0x14]
add edx, 1
mov dword [ebp - 0x14], edx
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
jmp 0x428f80
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0xc], eax
jmp 0x429014
jmp 0x42900f
movsx ecx, byte [ebp - 5]
cmp ecx, 1
je 0x428f97
movsx edx, byte [ebp - 5]
cmp edx, 2
jne 0x42900f
mov ax, word [ebp - 0x40]
push eax
call fcn.004376c0
add esp, 4
movzx ecx, ax
movzx edx, word [ebp - 0x40]
cmp ecx, edx
jne 0x428fba
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
jmp 0x428fc5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0xc], eax
jmp 0x429014
cmp dword [ebp - 0x50], 0
je 0x42900f
mov dword [ebp - 0x38], 1
mov word [ebp - 0x40], 0xd
mov cx, word [ebp - 0x40]
push ecx
call fcn.004376c0
add esp, 4
movzx edx, ax
movzx eax, word [ebp - 0x40]
cmp edx, eax
jne 0x429004
mov ecx, dword [ebp - 4]
add ecx, 1
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 0x14]
add edx, 1
mov dword [ebp - 0x14], edx
jmp 0x42900f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0xc], eax
jmp 0x429014
jmp 0x428c8b
jmp 0x4294ef
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
shl ecx, 6
mov edx, dword [eax*4 + 0x46b680]
movsx eax, byte [edx + ecx + 4]
and eax, 0x80
je 0x4294a5
mov dword [ebp - 0xc], 0
movsx ecx, byte [ebp - 5]
test ecx, ecx
jne 0x429192
mov dword [ebp - 0x45c], 0
mov dword [ebp - 0x460], 0
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x45c], edx
mov eax, dword [ebp - 0x45c]
sub eax, dword [ebp + 0xc]
cmp eax, dword [ebp + 0x10]
jae 0x42918d
lea ecx, [ebp - 0x458]
mov dword [ebp - 0x460], ecx
mov edx, dword [ebp - 0x460]
lea eax, [ebp - 0x458]
sub edx, eax
cmp edx, 0x400
jae 0x42911d
mov ecx, dword [ebp - 0x45c]
sub ecx, dword [ebp + 0xc]
cmp ecx, dword [ebp + 0x10]
jae 0x42911d
mov edx, dword [ebp - 0x45c]
mov al, byte [edx]
mov byte [ebp - 0x461], al
mov ecx, dword [ebp - 0x45c]
add ecx, 1
mov dword [ebp - 0x45c], ecx
movsx edx, byte [ebp - 0x461]
cmp edx, 0xa
jne 0x4290fb
mov eax, dword [ebp - 0x14]
add eax, 1
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x460]
mov byte [ecx], 0xd
mov edx, dword [ebp - 0x460]
add edx, 1
mov dword [ebp - 0x460], edx
mov eax, dword [ebp - 0x460]
mov cl, byte [ebp - 0x461]
mov byte [eax], cl
mov edx, dword [ebp - 0x460]
add edx, 1
mov dword [ebp - 0x460], edx
jmp 0x42908d
push 0
lea eax, [ebp - 0x10]
push eax
mov ecx, dword [ebp - 0x460]
lea edx, [ebp - 0x458]
sub ecx, edx
push ecx
lea eax, [ebp - 0x458]
push eax
mov ecx, dword [ebp + 8]
sar ecx, 5
mov edx, dword [ebp + 8]
and edx, 0x1f
shl edx, 6
mov eax, dword [ecx*4 + 0x46b680]
mov ecx, dword [eax + edx]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x42917d
mov edx, dword [ebp - 4]
add edx, dword [ebp - 0x10]
mov dword [ebp - 4], edx
mov eax, dword [ebp - 0x460]
lea ecx, [ebp - 0x458]
sub eax, ecx
cmp dword [ebp - 0x10], eax
jge 0x42917b
jmp 0x42918d
jmp 0x429188
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0xc], eax
jmp 0x42918d
jmp 0x42906f
jmp 0x4294a3
movsx edx, byte [ebp - 5]
cmp edx, 2
jne 0x4292de
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x87c], eax
mov dword [ebp - 0x874], 0
mov ecx, dword [ebp - 0x87c]
sub ecx, dword [ebp + 0xc]
cmp ecx, dword [ebp + 0x10]
jae 0x4292d9
lea edx, [ebp - 0x870]
mov dword [ebp - 0x874], edx
mov eax, dword [ebp - 0x874]
lea ecx, [ebp - 0x870]
sub eax, ecx
cmp eax, 0x3ff
jae 0x429269
mov edx, dword [ebp - 0x87c]
sub edx, dword [ebp + 0xc]
cmp edx, dword [ebp + 0x10]
jae 0x429269
mov eax, dword [ebp - 0x87c]
mov cx, word [eax]
mov word [ebp - 0x878], cx
mov edx, dword [ebp - 0x87c]
add edx, 2
mov dword [ebp - 0x87c], edx
movzx eax, word [ebp - 0x878]
cmp eax, 0xa
jne 0x429245
mov ecx, dword [ebp - 0x14]
add ecx, 2
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp - 0x874]
mov word [edx], 0xd
mov eax, dword [ebp - 0x874]
add eax, 2
mov dword [ebp - 0x874], eax
mov ecx, dword [ebp - 0x874]
mov dx, word [ebp - 0x878]
mov word [ecx], dx
mov eax, dword [ebp - 0x874]
add eax, 2
mov dword [ebp - 0x874], eax
jmp 0x4291d0
push 0
lea ecx, [ebp - 0x10]
push ecx
mov edx, dword [ebp - 0x874]
lea eax, [ebp - 0x870]
sub edx, eax
push edx
lea ecx, [ebp - 0x870]
push ecx
mov edx, dword [ebp + 8]
sar edx, 5
mov eax, dword [ebp + 8]
and eax, 0x1f
shl eax, 6
mov ecx, dword [edx*4 + 0x46b680]
mov edx, dword [ecx + eax]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4292c9
mov eax, dword [ebp - 4]
add eax, dword [ebp - 0x10]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 0x874]
lea edx, [ebp - 0x870]
sub ecx, edx
cmp dword [ebp - 0x10], ecx
jge 0x4292c7
jmp 0x4292d9
jmp 0x4292d4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0xc], eax
jmp 0x4292d9
jmp 0x4291b2
jmp 0x4294a3
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x9e4], eax
mov dword [ebp - 0x9dc], 0
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x9e4], ecx
mov edx, dword [ebp - 0x9e4]
sub edx, dword [ebp + 0xc]
cmp edx, dword [ebp + 0x10]
jae 0x4294a3
mov dword [ebp - 0xc9c], 0
lea eax, [ebp - 0x9d8]
mov dword [ebp - 0x9dc], eax
mov ecx, dword [ebp - 0x9dc]
lea edx, [ebp - 0x9d8]
sub ecx, edx
cmp ecx, 0x152
jae 0x4293af
mov eax, dword [ebp - 0x9e4]
sub eax, dword [ebp + 0xc]
cmp eax, dword [ebp + 0x10]
jae 0x4293af
mov ecx, dword [ebp - 0x9e4]
mov dx, word [ecx]
mov word [ebp - 0x9e0], dx
mov eax, dword [ebp - 0x9e4]
add eax, 2
mov dword [ebp - 0x9e4], eax
movzx ecx, word [ebp - 0x9e0]
cmp ecx, 0xa
jne 0x42938b
mov edx, dword [ebp - 0x9dc]
mov word [edx], 0xd
mov eax, dword [ebp - 0x9dc]
add eax, 2
mov dword [ebp - 0x9dc], eax
mov ecx, dword [ebp - 0x9dc]
mov dx, word [ebp - 0x9e0]
mov word [ecx], dx
mov eax, dword [ebp - 0x9dc]
add eax, 2
mov dword [ebp - 0x9dc], eax
jmp 0x429322
push 0
push 0
push 0x2ab
lea ecx, [ebp - 0xc98]
push ecx
mov eax, dword [ebp - 0x9dc]
lea edx, [ebp - 0x9d8]
sub eax, edx
cdq
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x9d8]
push eax
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [ebp - 0xc9c], eax
cmp dword [ebp - 0xc9c], 0
jne 0x429409
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0xc], eax
jmp 0x4294a3
mov dword [ebp - 0xca0], 0
push 0
lea ecx, [ebp - 0x10]
push ecx
mov edx, dword [ebp - 0xc9c]
sub edx, dword [ebp - 0xca0]
push edx
mov eax, dword [ebp - 0xca0]
lea ecx, [ebp + eax - 0xc98]
push ecx
mov edx, dword [ebp + 8]
sar edx, 5
mov eax, dword [ebp + 8]
and eax, 0x1f
shl eax, 6
mov ecx, dword [edx*4 + 0x46b680]
mov edx, dword [ecx + eax]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x429469
mov eax, dword [ebp - 0xca0]
add eax, dword [ebp - 0x10]
mov dword [ebp - 0xca0], eax
jmp 0x429474
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0xc], eax
jmp 0x429482
mov ecx, dword [ebp - 0xc9c]
cmp ecx, dword [ebp - 0xca0]
jg 0x429413
mov edx, dword [ebp - 0xc9c]
cmp edx, dword [ebp - 0xca0]
jle 0x429492
jmp 0x4294a3
mov eax, dword [ebp - 0x9e4]
sub eax, dword [ebp + 0xc]
mov dword [ebp - 4], eax
jmp 0x4292fa
jmp 0x4294ef
push 0
lea ecx, [ebp - 0x10]
push ecx
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
sar ecx, 5
mov edx, dword [ebp + 8]
and edx, 0x1f
shl edx, 6
mov eax, dword [ecx*4 + 0x46b680]
mov ecx, dword [eax + edx]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4294e6
mov dword [ebp - 0xc], 0
mov edx, dword [ebp - 0x10]
mov dword [ebp - 4], edx
jmp 0x4294ef
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 4], 0
jne 0x42957d
cmp dword [ebp - 0xc], 0
je 0x42952f
cmp dword [ebp - 0xc], 5
jne 0x42951c
call fcn.00406a30
mov dword [eax], 9
call fcn.00406a60
mov ecx, dword [ebp - 0xc]
mov dword [eax], ecx
jmp 0x429528
mov edx, dword [ebp - 0xc]
push edx
call fcn.00406820
add esp, 4
or eax, 0xffffffff
jmp 0x429583
mov eax, dword [ebp + 8]
sar eax, 5
mov ecx, dword [ebp + 8]
and ecx, 0x1f
shl ecx, 6
mov edx, dword [eax*4 + 0x46b680]
movsx eax, byte [edx + ecx + 4]
and eax, 0x40
je 0x429560
mov ecx, dword [ebp + 0xc]
movsx edx, byte [ecx]
cmp edx, 0x1a
jne 0x429560
xor eax, eax
jmp 0x429583
call fcn.00406a30
mov dword [eax], 0x1c
call fcn.00406a60
mov dword [eax], 0
or eax, 0xffffffff
jmp 0x429583
mov eax, dword [ebp - 4]
sub eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x44]
xor ecx, ebp
call fcn.00402690
mov esp, ebp
pop ebp
ret