Function at 0x46d9b0
Capabilities:
Write file on windows

Disassembly:
mov eax, 0x4340
call fcn.0048a020
mov eax, dword [0x4f7600]
xor eax, esp
mov dword [esp + 0x433c], eax
push ebx
mov ebx, dword [esp + 0x434c]
push ebp
push esi
push edi
mov edi, ecx
mov ecx, dword [esp + 0x4360]
cmp ecx, 3
je 0x46da20
cmp ecx, 2
je 0x46da20
cmp ecx, 1
jne 0x46da16
mov eax, dword [edi + 4]
cmp eax, 0xffffffff
je 0x46d9fd
push dword [edi]
call fcn.00470980
add esp, 4
mov esi, dword [edi]
mov ebp, dword [esp + 0x4354]
mov dword [edi + 4], 0xffffffff
cmp ebp, dword [esi + 4]
jl 0x46db14
mov eax, 0x10000
jmp 0x46ddee
mov eax, dword [edi + 4]
cmp ecx, 3
jne 0x46d9ee
mov ebp, dword [esp + 0x4354]
cmp ebp, eax
je 0x46dacf
cmp eax, 0xffffffff
je 0x46da46
push dword [edi]
call fcn.00470980
add esp, 4
mov eax, dword [edi]
mov dword [edi + 4], 0xffffffff
cmp ebp, dword [eax + 4]
jge 0x46da16
cmp ebp, dword [eax + 0x10]
jge 0x46da62
push eax
call fcn.00470a00
add esp, 4
mov esi, dword [edi]
cmp dword [esi + 0x10], ebp
jge 0x46dac3
nop dword [eax]
test esi, esi
je 0x46dabc
cmp dword [esi + 0x18], 0
je 0x46dabc
mov edx, dword [esi + 0x10]
inc edx
cmp edx, dword [esi + 4]
je 0x46dabc
mov ecx, dword [esi + 0x50]
mov eax, dword [esi + 0x48]
add ecx, 0x2e
add ecx, dword [esi + 0x4c]
push 0
push 0
push 0
push 0
add eax, ecx
mov dword [esi + 0x10], edx
add dword [esi + 0x14], eax
lea eax, [esi + 0x78]
push 0
push 0
push eax
lea eax, [esi + 0x28]
push eax
push esi
call fcn.00471390
add esp, 0x24
neg eax
sbb eax, eax
inc eax
mov dword [esi + 0x18], eax
mov esi, dword [edi]
cmp dword [esi + 0x10], ebp
jl 0x46da70
push esi
call fcn.00470ce0
add esp, 4
mov dword [edi + 4], ebp
push dword [esp + 0x435c]
push ebx
push dword [edi]
call fcn.00471000
mov esi, eax
add esp, 0xc
test esi, esi
jle 0x46daf1
mov eax, 0x600
jmp 0x46ddee
push dword [edi]
call fcn.00470980
add esp, 4
mov dword [edi + 4], 0xffffffff
test esi, esi
je 0x46dbf8
mov eax, 0x5000000
jmp 0x46ddee
cmp ebp, dword [esi + 0x10]
jge 0x46db4f
test esi, esi
je 0x46db4f
mov eax, dword [esi + 0x24]
push 0
push 0
push 0
push 0
push 0
mov dword [esi + 0x14], eax
lea eax, [esi + 0x78]
push 0
push eax
lea eax, [esi + 0x28]
mov dword [esi + 0x10], 0
push eax
push esi
call fcn.00471390
add esp, 0x24
neg eax
sbb eax, eax
inc eax
mov dword [esi + 0x18], eax
mov esi, dword [edi]
cmp dword [esi + 0x10], ebp
jge 0x46dba9
test esi, esi
je 0x46dba2
cmp dword [esi + 0x18], 0
je 0x46dba2
mov edx, dword [esi + 0x10]
inc edx
cmp edx, dword [esi + 4]
je 0x46dba2
mov ecx, dword [esi + 0x50]
mov eax, dword [esi + 0x48]
add ecx, 0x2e
add ecx, dword [esi + 0x4c]
push 0
push 0
push 0
push 0
add eax, ecx
mov dword [esi + 0x10], edx
add dword [esi + 0x14], eax
lea eax, [esi + 0x78]
push 0
push 0
push eax
lea eax, [esi + 0x28]
push eax
push esi
call fcn.00471390
add esp, 0x24
neg eax
sbb eax, eax
inc eax
mov dword [esi + 0x18], eax
mov esi, dword [edi]
cmp dword [esi + 0x10], ebp
jl 0x46db56
lea eax, [esp + 0x18]
mov ecx, edi
push eax
push ebp
call fcn.0046d300
test byte [esp + 0x120], 0x10
je 0x46dbff
cmp dword [esp + 0x4360], 1
je 0x46dbf8
push 0x103
lea eax, [esp + 0x148]
push eax
lea eax, [esp + 0x24]
push eax
call fcn.0046d760
lea eax, [esp + 0x150]
push eax
lea eax, [edi + 0x138]
push eax
call fcn.0046cff0
add esp, 0x14
xor eax, eax
jmp 0x46ddee
mov ebp, dword [esp + 0x4360]
cmp ebp, 1
je 0x46dd23
movzx eax, word [ebx]
mov edx, ebx
mov ecx, ebx
test ax, ax
je 0x46dd06
mov esi, eax
cmp si, 0x2f
je 0x46dc32
cmp si, 0x5c
je 0x46dc32
add ecx, 2
jmp 0x46dc37
lea edx, [ecx + 2]
mov ecx, edx
movzx eax, word [ecx]
mov esi, eax
test ax, ax
jne 0x46dc21
cmp edx, ebx
je 0x46dd06
lea esi, [esp + 0x144]
mov ecx, ebx
sub esi, ebx
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [esi + ecx - 2], ax
test ax, ax
jne 0x46dc54
sub edx, ebx
sar edx, 1
lea edx, [edx*2 - 2]
cmp edx, 0x208
jae 0x46de09
xor eax, eax
mov word [esp + edx + 0x144], ax
mov ax, word [esp + 0x144]
cmp ax, 0x2f
je 0x46dca9
cmp ax, 0x5c
je 0x46dca9
cmp word [esp + 0x146], 0x3a
mov byte [esp + 0x13], 0
jne 0x46dcae
mov byte [esp + 0x13], 1
lea eax, [esp + 0x144]
push 0x4c1c3c
push eax
call fcn.0048c3ce
mov esi, eax
lea eax, [esp + 0x14c]
push 0x4c1c44
push eax
call fcn.0048c3ce
movzx ecx, byte [esp + 0x23]
add esp, 0x10
test eax, eax
mov eax, 1
setne dl
test esi, esi
cmovne ecx, eax
or dl, cl
jne 0x46dd06
lea eax, [esp + 0x144]
push eax
lea eax, [edi + 0x138]
push eax
call fcn.0046cff0
add esp, 8
push 0
push dword [esp + 0x124]
push 2
push 0
push 0
push 0x40000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x46dd32
mov eax, 0x200
jmp 0x46ddee
push dword [edi]
call fcn.00470ce0
push 0x4000
lea eax, [esp + 0x354]
mov byte [esp + 0x1b], 0
push eax
push dword [edi]
call fcn.00471000
add esp, 0x10
test eax, eax
js 0x46dd93
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
je 0x46dd98
push 0
lea ecx, [esp + 0x18]
push ecx
push eax
lea eax, [esp + 0x358]
push eax
push ebx
call esi
test eax, eax
je 0x46dd93
push 0x4000
lea eax, [esp + 0x350]
push eax
push dword [edi]
call fcn.00471000
add esp, 0xc
test eax, eax
jns 0x46dd5f
mov byte [esp + 0x13], 1
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
jne 0x46ddca
cmp byte [esp + 0x13], 0
jne 0x46ddca
lea eax, [esp + 0x134]
push eax
lea eax, [esp + 0x128]
push eax
lea eax, [esp + 0x134]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp ebp, 1
je 0x46ddd6
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [edi]
call fcn.00470980
xor eax, eax
add esp, 4
cmp byte [esp + 0x13], al
mov ecx, 0x400
cmovne eax, ecx
mov ecx, dword [esp + 0x434c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00489fe1
add esp, 0x4340
ret 0x10
call fcn.0048a9b5
int3