Function at 0x404460
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4a848f
mov eax, dword fs:[0]
push eax
sub esp, 0xb0
mov eax, dword [0x4dc38c]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [ebp + 0x10]
mov edi, dword [ebp + 0xc]
mov ebx, dword [ebp + 0x20]
mov dword [ebp - 0xa4], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0xa0], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x9c], eax
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x98], eax
mov eax, dword [ebp + 0x28]
mov dword [ebp - 0xb4], eax
mov byte [ebp - 0xa8], 0
mov dword [ebp - 0x18], 0xf
mov dword [ebp - 0x1c], 0
mov byte [ebp - 0x2c], 0
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x5c]
push 5
push 0x4c8554
mov dword [ebp - 0x48], 0xf
mov dword [ebp - 0x4c], 0
mov byte [ebp - 0x5c], 0
call fcn.00402680
mov byte [ebp - 4], 1
cmp dword [ebp - 0x98], 0
jg 0x404522
jl 0x40451c
cmp dword [ebp - 0x9c], 0
ja 0x404522
cmp dword [ebx + 0x10], 0
jbe 0x404572
push dword [ebp - 0xa0]
lea ecx, [ebp - 0x44]
push dword [ebp - 0xa4]
call fcn.0042a830
add esp, 8
push 0xffffffffffffffff
push 0
push eax
lea ecx, [ebp - 0x5c]
mov byte [ebp - 4], 2
call fcn.004029e0
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x30]
cmp eax, 0x10
jb 0x404563
inc eax
lea ecx, [ebp - 0x44]
push eax
push dword [ebp - 0x44]
call fcn.00402bb0
push 1
push 0x4c8564
lea ecx, [ebp - 0x5c]
call fcn.004028b0
sub esp, 0x18
mov ecx, esp
mov dword [ecx + 0x14], 0xf
mov dword [ecx + 0x10], 0
cmp dword [ecx + 0x14], 0x10
jb 0x40458f
mov eax, dword [ecx]
jmp 0x404591
mov eax, ecx
push 0xffffffffffffffff
mov byte [eax], 0
lea eax, [ebp - 0x5c]
push 0
push eax
call fcn.00402780
call fcn.0042adf0
add esp, 0x18
test al, al
je 0x404892
mov eax, dword [ebp - 0x98]
test eax, eax
jl 0x404697
mov ecx, dword [ebp - 0x9c]
jg 0x4045cf
test ecx, ecx
je 0x404697
push eax
push ecx
lea ecx, [ebp - 0x8c]
call fcn.0042a830
push eax
lea edx, [ebp - 0x5c]
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x44]
call fcn.004056f0
add esp, 0xc
push str..jpg
mov edx, eax
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x74]
call fcn.00403030
add esp, 4
mov dword [ebp - 0x90], eax
lea ecx, [ebp - 0x2c]
cmp ecx, eax
je 0x404644
mov eax, dword [ebp - 0x18]
cmp eax, 0x10
jb 0x404624
inc eax
push eax
push dword [ebp - 0x2c]
call fcn.00402bb0
push dword [ebp - 0x90]
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x18], 0xf
mov dword [ebp - 0x1c], 0
mov byte [ebp - 0x2c], 0
call fcn.00402ae0
mov eax, dword [ebp - 0x60]
cmp eax, 0x10
jb 0x404659
inc eax
lea ecx, [ebp - 0x74]
push eax
push dword [ebp - 0x74]
call fcn.00402bb0
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x60], 0xf
mov dword [ebp - 0x64], 0
mov byte [ebp - 0x74], 0
cmp eax, 0x10
jb 0x404680
inc eax
lea ecx, [ebp - 0x44]
push eax
push dword [ebp - 0x44]
call fcn.00402bb0
mov dword [ebp - 0x30], 0xf
mov dword [ebp - 0x34], 0
mov byte [ebp - 0x44], 0
jmp 0x40478b
cmp dword [ebx + 0x10], 0
lea ecx, [ebp - 0x8c]
jbe 0x4046fa
push ebx
lea edx, [ebp - 0x5c]
call fcn.00405720
add esp, 4
push str..jpg
mov edx, eax
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x44]
call fcn.00403030
add esp, 4
lea ecx, [ebp - 0x2c]
push eax
call fcn.00404960
mov eax, dword [ebp - 0x30]
cmp eax, 0x10
jb 0x404680
inc eax
lea ecx, [ebp - 0x44]
push eax
push dword [ebp - 0x44]
call fcn.00402bb0
mov dword [ebp - 0x30], 0xf
mov dword [ebp - 0x34], 0
mov byte [ebp - 0x44], 0
jmp 0x40478b
push dword [ebp - 0xa0]
push dword [ebp - 0xa4]
call fcn.0042a830
push eax
lea edx, [ebp - 0x5c]
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x74]
call fcn.004056f0
add esp, 0xc
push str..jpg
mov edx, eax
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x44]
call fcn.00403030
add esp, 4
lea ecx, [ebp - 0x2c]
push eax
call fcn.00404960
mov eax, dword [ebp - 0x30]
cmp eax, 0x10
jb 0x404752
inc eax
lea ecx, [ebp - 0x44]
push eax
push dword [ebp - 0x44]
call fcn.00402bb0
mov eax, dword [ebp - 0x60]
mov dword [ebp - 0x30], 0xf
mov dword [ebp - 0x34], 0
mov byte [ebp - 0x44], 0
cmp eax, 0x10
jb 0x404779
inc eax
lea ecx, [ebp - 0x74]
push eax
push dword [ebp - 0x74]
call fcn.00402bb0
mov dword [ebp - 0x60], 0xf
mov dword [ebp - 0x64], 0
mov byte [ebp - 0x74], 0
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x78]
cmp eax, 0x10
jb 0x4047aa
inc eax
lea ecx, [ebp - 0x8c]
push eax
push dword [ebp - 0x8c]
call fcn.00402bb0
cmp dword [ebp - 0x18], 0x10
lea eax, [ebp - 0x2c]
push 0x4c8584
cmovae eax, dword [ebp - 0x2c]
push eax
call fcn.0048b211
add esp, 8
mov dword [ebp - 0x90], eax
test eax, eax
je 0x404892
cmp dword [edi + 0x14], 0x10
mov ecx, dword [edi + 0x10]
jb 0x4047dc
mov edi, dword [edi]
push eax
push 1
push ecx
push edi
call fcn.0048b460
push dword [ebp - 0x90]
call fcn.0048b52e
add esp, 0x14
mov byte [ebp - 0xa8], 1
cmp dword [ebp - 0x98], 0
jl 0x404841
jg 0x40480f
cmp dword [ebp - 0x9c], 0
jbe 0x404841
mov eax, dword [ebp - 0xa4]
mov ecx, esi
mov dword [ebp - 0x90], eax
lea eax, [ebp - 0x90]
push eax
lea eax, [ebp - 0xbc]
push eax
call fcn.00405d50
mov ecx, dword [ebp - 0xbc]
lea eax, [ebp - 0x9c]
lea ecx, [ecx + 0x14]
jmp 0x40486b
cmp dword [ebx + 0x10], 0
jbe 0x404862
push ebx
lea eax, [ebp - 0xb0]
push eax
lea ecx, [esi + 0x10]
call fcn.00405de0
mov ecx, dword [ebp - 0xb0]
add ecx, 0x28
jmp 0x404881
lea eax, [ebp - 0xa4]
lea ecx, [esi + 8]
push eax
lea eax, [ebp - 0xb0]
push eax
call fcn.00405e70
mov ecx, dword [ebp - 0xb0]
add ecx, 0x18
lea eax, [ebp - 0x2c]
cmp ecx, eax
je 0x404892
push 0xffffffffffffffff
push 0
push eax
call fcn.00402780
mov eax, dword [esi + 0x1c]
xor edi, edi
sub eax, dword [esi + 0x18]
test eax, 0xfffffffc
jle 0x4048dc
mov eax, dword [esi + 0x18]
lea edx, [ebp - 0x2c]
push ebx
push dword [ebp - 0x98]
push dword [ebp - 0x9c]
mov ecx, dword [eax + edi*4]
push dword [ebp - 0xa0]
push dword [ebp - 0xa4]
mov eax, dword [ecx]
push edx
push dword [ebp - 0xa8]
call dword [eax]
mov eax, dword [esi + 0x1c]
inc edi
sub eax, dword [esi + 0x18]
sar eax, 2
cmp edi, eax
jl 0x4048a1
mov ebx, dword [ebp - 0xb4]
test ebx, ebx
je 0x4048fb
mov ecx, ebx
call fcn.004034c0
push 0x88
push ebx
call fcn.00482580
add esp, 8
mov eax, dword [ebp - 0x48]
cmp eax, 0x10
jb 0x404910
inc eax
lea ecx, [ebp - 0x5c]
push eax
push dword [ebp - 0x5c]
call fcn.00402bb0
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x48], 0xf
mov dword [ebp - 0x4c], 0
mov byte [ebp - 0x5c], 0
cmp eax, 0x10
jb 0x404937
inc eax
lea ecx, [ebp - 0x2c]
push eax
push dword [ebp - 0x2c]
call fcn.00402bb0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0048254c
mov esp, ebp
pop ebp
ret 0x24