Function at 0x401540
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x24b4
call fcn.00414a40
mov eax, dword [0x43f040]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [0x59ab84], 0
push ebx
push esi
mov ebx, ecx
push edi
mov dword [ebp - 0x247c], ebx
jne 0x40157f
movzx eax, word [0x59abca]
movzx edi, al
shl edi, 8
shr eax, 8
or edi, eax
jmp 0x401586
movzx edi, word [0x59abca]
mov dword [ebp - 0x2444], edi
cmp edi, 0x5aa
jbe 0x4015b9
push 0
push 0x43b47c
push str.E_Error_Max_Frag_len
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041418c
mov esp, ebp
pop ebp
ret
push 0x1fe0
lea eax, [ebp - 0x2440]
push 0
push eax
call fcn.00415680
lea eax, [edi - 6]
add esp, 0xc
mov dword [ebp - 0x2478], eax
cmp eax, 0x14
jbe 0x401938
mov dword [ebp - 0x2448], 0
mov dword [ebp - 0x2454], 0
mov dword [ebp - 0x2450], 0x14
test edi, edi
je 0x401938
mov edi, 0x14
mov edx, dword [edi + 0x59abd0]
mov ecx, edx
shr ecx, 0x10
mov ah, cl
mov al, ch
movzx ecx, dx
movzx eax, ax
mov dword [ebp - 0x2474], eax
movzx eax, cl
shl eax, 8
shr ecx, 8
or eax, ecx
cmp eax, 0x102
jne 0x401912
mov eax, dword [edi + 0x59abd4]
mov esi, 0x2a
movups xmm0, xmmword [edi + 0x59abe4]
shr eax, 0x10
movzx ebx, al
shr eax, 8
shl ebx, 8
or ebx, eax
movzx eax, word [edi + 0x59abfc]
movzx ecx, al
shr eax, 8
shl ecx, 8
or ecx, eax
mov dword [ebp - 0x2460], ebx
movups xmmword [ebp - 0x24a0], xmm0
mov eax, 0
mov dword [ebp - 0x2470], ecx
movq xmm0, qword [edi + 0x59abf4]
movq qword [ebp - 0x2490], xmm0
mov dword [ebp - 0x244c], eax
jbe 0x401912
cmp eax, 3
jae 0x401912
mov eax, dword [edi + esi + 0x59abd4]
mov dword [ebp - 0x246c], eax
mov ax, word [edi + esi + 0x59abd8]
add esi, 6
movzx eax, ax
movzx ebx, al
shl ebx, 8
shr eax, 8
or ebx, eax
mov dword [ebp - 0x2458], ebx
cmp ebx, 0xff
jbe 0x4016fd
movzx eax, bl
shl eax, 8
shr ebx, 8
or ebx, eax
mov dword [ebp - 0x2458], ebx
cmp ebx, 0xff
ja 0x401912
xor edi, edi
test ebx, ebx
je 0x4017f4
mov eax, dword [ebp - 0x2450]
lea eax, [eax + 0x59abd4]
add eax, esi
mov dword [ebp - 0x245c], eax
nop dword [eax + eax]
mov edx, dword [eax]
mov cx, word [eax + 4]
movzx eax, dx
movzx ebx, al
shr eax, 8
mov dword [ebp - 0x2484], edx
shr edx, 0x10
shl ebx, 8
or ebx, eax
movzx eax, dl
shl eax, 8
shr edx, 8
or eax, edx
mov dword [ebp - 0x2464], ebx
mov ebx, dword [ebp - 0x2458]
mov dword [ebp - 0x246c], eax
movzx eax, cx
mov ecx, dword [ebp - 0x2460]
movzx edx, al
shr eax, 8
shl edx, 8
or edx, eax
mov eax, dword [ebp - 0x244c]
cmp ecx, 1
jne 0x401782
imul eax, dword [ebp - 0x2448]
jmp 0x40178e
imul eax, dword [ebp - 0x2454]
add eax, 0xff
add eax, edi
cmp eax, 0x1fe
jle 0x4017a3
cmp esi, dword [ebp - 0x2444]
ja 0x401851
add eax, eax
add esi, 6
mov dword [ebp + eax*8 - 0x2440], ecx
mov ecx, dword [ebp - 0x2464]
mov dword [ebp + eax*8 - 0x243c], ecx
mov ecx, dword [ebp - 0x246c]
mov dword [ebp + eax*8 - 0x2438], ecx
mov dword [ebp + eax*8 - 0x2434], edx
mov eax, dword [ebp - 0x245c]
add eax, 6
mov dword [ebp - 0x245c], eax
cmp esi, dword [ebp - 0x2444]
ja 0x401886
inc edi
cmp edi, ebx
jb 0x401720
mov edi, dword [ebp - 0x2444]
cmp dword [ebp - 0x2460], 1
mov ecx, dword [ebp - 0x2454]
mov eax, dword [ebp - 0x2450]
cmovne ecx, ebx
cmovne ebx, dword [ebp - 0x2448]
add eax, esi
mov dword [ebp - 0x2454], ecx
add esi, 2
xor edx, edx
mov dword [ebp - 0x2448], ebx
mov ax, word [eax + 0x59abd4]
mov ch, al
mov cl, ah
movzx eax, cx
test eax, eax
je 0x4018f3
add esi, 6
cmp esi, edi
ja 0x4018c2
inc edx
cmp edx, eax
jl 0x401840
jmp 0x4018f3
push eax
push str._nMAX_Slot__u_n
lea eax, [ebp - 0x260]
push 0x12c
push eax
call fcn.00401170
add esp, 0x10
lea eax, [ebp - 0x260]
push 0
push 0x43b47c
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x4017f4
mov edi, dword [ebp - 0x2444]
lea eax, [ebp - 0x260]
push edi
push esi
push str._nMAX_data_len__u__u_n
push 0x12c
push eax
call fcn.00401170
add esp, 0x14
lea eax, [ebp - 0x260]
push 0
push 0x43b47c
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x4017fa
push edi
push esi
push str._nMAX_data_len_IOCS__u__u_n
lea eax, [ebp - 0x260]
push 0x12c
push eax
call fcn.00401170
add esp, 0x14
lea eax, [ebp - 0x260]
push 0
push 0x43b47c
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
mov eax, dword [ebp - 0x244c]
mov edi, dword [ebp - 0x2450]
inc eax
mov dword [ebp - 0x244c], eax
cmp eax, dword [ebp - 0x2470]
jb 0x4016a3
mov eax, dword [ebp - 0x2474]
add edi, 4
movzx eax, ax
add edi, eax
mov dword [ebp - 0x2450], edi
cmp edi, dword [ebp - 0x2478]
jb 0x40160c
mov ebx, dword [ebp - 0x247c]
lea ecx, [ebp - 0x460]
sub ecx, ebx
movzx eax, word [ebx]
lea ebx, [ebx + 2]
mov word [ecx + ebx - 2], ax
test ax, ax
jne 0x401940
lea ecx, [ebp - 0x460]
add ecx, 0xfffffffe
nop dword [eax]
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x401960
mov eax, dword [str..pdp]
mov dword [ecx], eax
mov eax, dword [0x43b538]
mov dword [ecx + 4], eax
mov ax, word [0x43b53c]
mov word [ecx + 8], ax
lea eax, [ebp - 0x460]
push 0x43a35c
push eax
lea eax, [ebp - 0x2448]
push eax
call fcn.0041781f
add esp, 0xc
test eax, eax
je 0x4019ca
lea ecx, [ebp - 0x460]
push ecx
push eax
push str.Error_writing_file:_error__d__s_n
call fcn.00401100
add esp, 0xc
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041418c
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x2448]
test eax, eax
je 0x401a04
push eax
push 1
lea eax, [ebp - 0x2440]
push 0x1fe0
push eax
call fcn.0041d86c
push dword [ebp - 0x2448]
call fcn.004180b9
add esp, 0x14
push dword [ebp - 0x2448]
call fcn.00418185
add esp, 4
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041418c
mov esp, ebp
pop ebp
ret