Function at 0x4246ac
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov dword [ebp - 4], ebx
mov dword [ebp - 8], edi
mov dword [ebp - 0xc], esi
mov ebx, ecx
mov esi, edx
mov edi, eax
test edi, edi
je 0x424bb3
mov ecx, dword [edi + 0xdc]
movzx eax, byte [edi + 0x168]
movzx edx, byte [edi + 0x169]
mov dword [ebp - 0x10], ecx
mov ecx, dword [edi + 0x138]
and eax, 0x80
shr eax, 7
mov dword [ebp - 0x1c], eax
and edx, 1
xor eax, eax
mov dword [ebp - 0x24], edx
mov dword [edi + 0xc8], eax
mov dword [edi + 0xcc], eax
mov dword [edi + 0xe8], eax
test ebx, ebx
jne 0x4247b7
test edi, edi
je 0x424aa4
test byte [edi + 0x165], 4
jne 0x42473c
xor eax, eax
mov dword [edi + 0xa8], eax
mov dword [edi + 0xac], eax
mov esi, 1
jmp 0x424a95
lea eax, [ebp - 0x14]
push 0
push eax
mov edx, dword [edi + 0x38]
mov ebx, dword [edi + 0x40]
sub ebx, edx
push ebx
push edx
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov esi, eax
mov eax, dword [edi + 0x38]
mov edx, dword [edi + 0xf0]
and byte [edi + 0x165], 0xfb
xor ecx, ecx
test esi, esi
mov dword [edi + 0x40], ecx
mov dword [edi + 0x3c], eax
mov dword [edi + 0xa8], ecx
mov dword [edi + 0xac], ecx
jne 0x424784
mov esi, 0xffffffff
add edx, eax
mov dword [edi + 0x44], edx
mov eax, ebx
cdq
mov eax, dword [edi + 0xc0]
add ebx, eax
adc edx, dword [edi + 0xc4]
mov dword [edi + 0xc0], ebx
mov dword [edi + 0xb8], ebx
mov dword [edi + 0xc4], edx
mov dword [edi + 0xbc], edx
jmp 0x424a95
test edi, edi
je 0x424833
mov eax, dword [edi + 0x40]
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x424833
cmp esi, dword [ebp - 0x2c]
je 0x424833
mov edx, eax
mov eax, dword [edi + 0x38]
sub edx, eax
mov dword [ebp - 0x2c], edx
je 0x424833
lea edx, [ebp - 0x14]
push 0
mov dword [ebp - 0x20], ecx
push edx
push dword [ebp - 0x2c]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 0x20]
test eax, eax
jne 0x42480b
xor eax, eax
mov dword [edi + 0xa8], eax
mov dword [edi + 0xac], eax
mov esi, 0xffffffff
jmp 0x424a95
mov eax, dword [ebp - 0x2c]
cdq
add eax, dword [edi + 0xc0]
adc edx, dword [edi + 0xc4]
mov dword [edi + 0xc0], eax
mov dword [edi + 0xb8], eax
mov dword [edi + 0xc4], edx
mov dword [edi + 0xbc], edx
cmp dword [0x4e8dc0], 0
je 0x4248e7
test ecx, ecx
jne 0x42484e
mov esi, 0xffffffff
jmp 0x4248cc
cmp dword [ebp - 0x1c], 0
je 0x42485d
cmp ecx, 0xfffffffa
je 0x424b4f
cmp ecx, 2
je 0x424867
cmp ecx, 1
jne 0x424887
mov dword [ebp - 0x20], ecx
call fcn.004ac7c0
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 0x2c], eax
cmp dword [0x4e8dc0], 0
je 0x4248b2
mov dword [ebp - 0x28], 1
jmp 0x42488f
xor eax, eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x1c], 0
je 0x4248ac
cmp dword [ebp - 0x24], 0
je 0x4248ac
push dword [ebp - 0x2c]
mov dword [ebp - 0x20], ecx
call fcn.004ac530
mov ecx, dword [ebp - 0x20]
add esp, 4
cmp dword [ebp - 0x28], 0
je 0x4248e7
push 0
push dword [ebp - 0x2c]
push ebx
push esi
call fcn.004ac590
add esp, 0x10
mov esi, eax
cmp esi, ebx
je 0x4248cc
mov esi, 0xffffffff
test edi, edi
je 0x424a95
xor edx, edx
mov dword [edi + 0xa8], edx
mov dword [edi + 0xac], edx
jmp 0x424a95
test edi, edi
je 0x42495b
test byte [edi + 0x169], 0x40
jne 0x4248fc
mov eax, dword [edi + 0x40]
mov dword [ebp - 0x28], eax
jmp 0x424944
test byte [edi + 0x167], 1
je 0x42490d
mov eax, dword [edi + 0x40]
mov dword [ebp - 0x28], eax
jmp 0x424944
mov edx, dword [edi + 0x38]
mov eax, dword [edi + 0x40]
cmp esi, edx
mov dword [ebp - 0x28], eax
je 0x42491f
cmp esi, dword [ebp - 0x28]
jne 0x424951
mov eax, edx
add eax, dword [edi + 0xe4]
mov edx, dword [edi + 0x3c]
mov dword [ebp - 0x1c], ebx
mov ebx, dword [edi + 0xf0]
mov dword [ebp - 0x2c], ebx
lea edx, [edx + ebx*2]
cmp eax, edx
mov ebx, dword [ebp - 0x1c]
ja 0x424a61
cmp esi, dword [ebp - 0x28]
jne 0x424951
add ebx, dword [ebp - 0x28]
mov esi, dword [edi + 0x38]
sub ebx, esi
mov eax, dword [edi + 0x134]
test eax, eax
jne 0x424960
mov eax, 0x20000
cmp ebx, eax
jbe 0x4249c8
mov edx, ebx
test edi, edi
je 0x424974
mov eax, dword [edi + 0x134]
test eax, eax
jne 0x424979
mov eax, 0x20000
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x1c], ebx
mov ebx, eax
mov dword [ebp - 0x2c], esi
mov esi, dword [ebp - 0x10]
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x18], edi
mov edi, dword [ebp - 0x24]
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
cmp esi, eax
je 0x424af4
lea edx, [ebp - 0x14]
push 0
push edx
push ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, 1
je 0x424aab
mov ebx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x20]
mov edi, dword [ebp - 0x18]
mov esi, eax
jmp 0x4249f8
push 0xfffffffffffffff5
mov dword [ebp - 0x20], ecx
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ecx, dword [ebp - 0x20]
cmp eax, dword [ebp - 0x10]
je 0x424b61
lea eax, [ebp - 0x14]
push 0
mov dword [ebp - 0x20], ecx
push eax
push ebx
push esi
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 0x20]
mov esi, eax
test esi, esi
jne 0x424a0a
cmp ecx, 1
je 0x424b39
mov esi, 0xffffffff
test edi, edi
je 0x424a95
mov edx, dword [edi + 0x38]
add edx, dword [edi + 0xf0]
xor ecx, ecx
mov dword [edi + 0x40], ecx
mov dword [edi + 0x44], edx
and byte [edi + 0x165], 0xfb
mov eax, ebx
cdq
mov eax, dword [edi + 0xc0]
add ebx, eax
adc edx, dword [edi + 0xc4]
mov dword [edi + 0xc0], ebx
mov dword [edi + 0xb8], ebx
mov dword [edi + 0xc4], edx
mov dword [edi + 0xbc], edx
mov dword [edi + 0xa8], ecx
mov dword [edi + 0xac], ecx
jmp 0x424a95
mov ecx, dword [ebp - 0x2c]
or byte [edi + 0x165], 4
add esi, ebx
mov dword [edi + 0x40], esi
add dword [edi + 0x44], ecx
mov eax, ebx
cdq
add dword [edi + 0xb8], ebx
adc dword [edi + 0xbc], edx
xor ebx, ebx
mov dword [edi + 0xa8], ebx
mov dword [edi + 0xac], ebx
mov esi, 1
mov ebx, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov eax, esi
mov esi, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
mov esi, 1
jmp 0x424a95
mov edx, dword [ebp - 0x14]
sub dword [ebp - 0x28], edx
add edi, edx
cmp dword [ebp - 0x18], 0
je 0x424ac6
mov ecx, dword [ebp - 0x18]
mov ecx, dword [ecx + 0x134]
test ecx, ecx
jne 0x424acb
mov ecx, 0x20000
cmp ecx, dword [ebp - 0x28]
jb 0x424ad9
mov ebx, dword [ebp - 0x28]
test ebx, ebx
jne 0x424adf
jmp 0x424ae7
cmp dword [ebp - 0x28], 0
je 0x424ae7
test edx, edx
ja 0x424993
mov ebx, dword [ebp - 0x1c]
mov edi, dword [ebp - 0x18]
mov esi, eax
jmp 0x424a0a
push esi
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 2
jne 0x4249a3
push ebx
push edi
push 1
call fcn.0045a230
add esp, 0xc
mov edx, eax
cmp edx, 0xffffffff
je 0x424b21
mov dword [ebp - 0x14], edx
mov eax, 1
jmp 0x424aae
lea edx, [ebp - 0x14]
push 0
push edx
push dword [ebp - 0x1c]
push dword [ebp - 0x2c]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x4249b2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 6
jne 0x424a05
xor esi, esi
jmp 0x424a0a
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x28], 1
mov dword [ebp - 0x2c], eax
jmp 0x424895
push dword [ebp - 0x10]
mov dword [ebp - 0x20], ecx
call dword [sym.imp.KERNEL32.dll_GetFileType]
mov ecx, dword [ebp - 0x20]
cmp eax, 2
jne 0x4249df
push ebx
mov dword [ebp - 0x20], ecx
push esi
push 1
call fcn.0045a230
mov ecx, dword [ebp - 0x20]
add esp, 0xc
cmp eax, 0xffffffff
je 0x424b9a
mov esi, 1
jmp 0x424a0a
lea eax, [ebp - 0x14]
push 0
mov dword [ebp - 0x20], ecx
push eax
push ebx
push esi
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x4249f3
cmp dword [0x4e8dc0], 0
jne 0x424bdc
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [ebp - 0x10], eax
mov eax, dword [0x4e8dc0]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x24], eax
mov ecx, 1
jmp 0x42470b
call fcn.004ac7c0
jmp 0x424bc4