Function at 0x40cd50
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41c0dc
mov eax, dword fs:[0]
push eax
mov eax, 0x226c
call fcn.0041b840
mov eax, dword [0x425024]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x2258], edx
push 0x41d7ac
lea ecx, [ebp - 0x2214]
call fcn.00402e20
lea ecx, [ebp - 0x221c]
mov dword [ebp - 4], 0
call fcn.0040a270
mov byte [ebp - 4], 1
or ebx, 0xffffffff
mov edx, dword [eax]
mov esi, dword [ebp - 0x2214]
add esi, 0xfffffff0
lea ecx, [edx - 0x10]
cmp ecx, esi
je 0x40ce10
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x40ce01
mov eax, dword [ecx]
cmp eax, dword [esi]
jne 0x40ce01
call fcn.004031a0
mov dword [ebp - 0x2220], eax
mov ecx, ebx
lock xadd dword [edi], ecx
dec ecx
test ecx, ecx
jg 0x40cdf6
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x2220]
add eax, 0x10
mov dword [ebp - 0x2214], eax
jmp 0x40ce10
push dword [edx - 0xc]
lea ecx, [ebp - 0x2214]
push edx
call fcn.00403200
mov byte [ebp - 4], 0
mov eax, ebx
mov edx, dword [ebp - 0x221c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40ce31
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x2214]
cmp dword [eax - 0xc], 0
jne 0x40ce44
xor esi, esi
jmp 0x40d347
lea eax, [ebp - 0x224c]
mov dword [ebp - 0x2224], 0
push eax
mov dword [ebp - 0x221c], 0
mov dword [ebp - 0x2218], 0
mov dword [ebp - 0x2220], 0
mov dword [ebp - 0x2254], 0
mov dword [ebp - 0x2250], 0
mov dword [ebp - 0x2234], 0
mov dword [ebp - 0x2230], 0
mov dword [ebp - 0x222c], 0
mov dword [ebp - 0x2228], 0
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0x400
lea eax, [ebp - 0xa10]
mov byte [ebp - 4], 2
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0xa10]
push eax
push 0x41d928
push ecx
call fcn.00409af0
add esp, 0xc
lea eax, [ebp - 0x210]
push 0x200
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
push 0x4288d8
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
jle 0x40cf3d
mov esi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
push 0x4288d8
push 0
push 0
call esi
push 0
push 0
push eax
lea eax, [ebp - 0x210]
push eax
push 0xffffffffffffffff
push 0x4288d8
push 0
push 0
call esi
cmp byte [ebp - 0x210], 0
mov dword [ebp - 0x225c], 0xf
mov dword [ebp - 0x2260], 0
mov byte [ebp - 0x2270], 0
jne 0x40cf65
xor ecx, ecx
jmp 0x40cf79
lea ecx, [ebp - 0x210]
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40cf70
sub ecx, edx
push ecx
lea eax, [ebp - 0x210]
push eax
lea ecx, [ebp - 0x2270]
call fcn.00402f80
push 0xac
mov byte [ebp - 4], 3
call fcn.0041a791
add esp, 4
mov dword [ebp - 0x2274], eax
mov ecx, eax
call fcn.00407c10
mov ebx, eax
lea eax, [ebp - 0x2270]
lea ecx, [ebx + 4]
cmp ecx, eax
je 0x40cfc3
push 0xffffffffffffffff
push 0
push eax
call fcn.00403080
mov ecx, ebx
call fcn.00407e40
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x225c]
cmp eax, 0x10
jb 0x40cfe6
inc eax
push eax
push dword [ebp - 0x2270]
call fcn.004032b0
push 0x400
lea eax, [ebp - 0x610]
mov dword [ebp - 0x225c], 0xf
push 0
push eax
mov dword [ebp - 0x2260], 0
mov byte [ebp - 0x2270], 0
call sub.VCRUNTIME140.dll_memset
lea esi, [ebx + 0x34]
add esp, 0xc
cmp dword [esi + 0x14], 0x10
jb 0x40d022
mov esi, dword [esi]
mov edi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test esi, esi
je 0x40d04a
push 0
push 0
push 0xffffffffffffffff
push esi
push 0
push 0
call edi
push eax
lea eax, [ebp - 0x610]
push eax
push 0xffffffffffffffff
push esi
push 0
push 0
call edi
push 0x400
lea eax, [ebp - 0x1a10]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
lea esi, [ebx + 0x64]
add esp, 0xc
cmp dword [esi + 0x14], 0x10
jb 0x40d06b
mov esi, dword [esi]
test esi, esi
je 0x40d08d
push 0
push 0
push 0xffffffffffffffff
push esi
push 0
push 0
call edi
push eax
lea eax, [ebp - 0x1a10]
push eax
push 0xffffffffffffffff
push esi
push 0
push 0
call edi
push 0x400
lea eax, [ebp - 0x1e10]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x1e10]
push eax
push str.2.._uu
push ecx
call fcn.00409af0
add esp, 0xc
lea eax, [ebp - 0x2210]
push 0x400
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x2210]
push eax
push str._36_
push ecx
call fcn.00409af0
add esp, 0xc
lea eax, [ebp - 0xe10]
push 0x400
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0xe10]
push eax
push str.6341j
push ecx
call fcn.00409af0
add esp, 0xc
lea eax, [ebp - 0x1210]
push 0x400
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x1210]
push eax
push 0x41d8b0
push ecx
call fcn.00409af0
add esp, 0xc
lea eax, [ebp - 0x1610]
push 0x400
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x1610]
push eax
push str.34_5j
push ecx
call fcn.00409af0
add esp, 8
mov dword [ebp - 0x2228], 0xfde9
lea eax, [ebp - 0x610]
lea ecx, [ebp - 0x2254]
push eax
lea eax, [ebp - 0xa10]
push eax
call fcn.00406e80
lea ecx, [ebp - 0x2254]
call fcn.00407050
mov esi, eax
test esi, esi
je 0x40d1c0
mov edx, dword [ebp - 0x2228]
lea ecx, [ebp - 0xe10]
call fcn.00407ab0
mov dword [esi + 4], eax
lea ecx, [ebp - 0x1210]
mov edx, dword [ebp - 0x2228]
call fcn.00407ab0
mov dword [esi + 8], eax
mov edi, dword [ebp - 0x2214]
test edi, edi
je 0x40d1ff
lea ecx, [ebp - 0x2254]
call fcn.00407050
mov esi, eax
test esi, esi
je 0x40d1ff
mov edx, dword [ebp - 0x2228]
lea ecx, [ebp - 0x1610]
call fcn.00407ab0
mov dword [esi + 4], eax
mov ecx, edi
mov edx, dword [ebp - 0x2228]
call fcn.00407ab0
mov dword [esi + 8], eax
lea eax, [ebp - 0x2220]
push eax
lea eax, [ebp - 0x221c]
push eax
lea eax, [ebp - 0x2218]
push eax
lea eax, [ebp - 0x2224]
push eax
lea eax, [ebp - 0x1a10]
push eax
lea ecx, [ebp - 0x2254]
call fcn.00407320
mov edi, dword [ebp - 0x2218]
xor ebx, ebx
mov esi, dword [ebp - 0x2224]
test edi, edi
je 0x40d291
push 0x41d9f0
push dword [ebp - 0x2258]
lea eax, [ebp - 0x2218]
mov dword [ebp - 0x2218], ebx
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wfopen_s]
add esp, 0xc
test eax, eax
jne 0x40d28f
mov eax, dword [ebp - 0x2218]
test eax, eax
je 0x40d28f
push eax
push 1
push edi
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
push dword [ebp - 0x2218]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 0x14
mov ebx, 1
jmp 0x40d291
xor ebx, ebx
test esi, esi
je 0x40d29e
push esi
call fcn.0041a7e7
add esp, 4
mov eax, dword [ebp - 0x221c]
test eax, eax
je 0x40d2b1
push eax
call fcn.0041a7e7
add esp, 4
mov eax, dword [ebp - 0x2254]
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
test eax, eax
je 0x40d2cc
push eax
call edi
xor eax, eax
mov dword [ebp - 0x2254], eax
mov ecx, dword [ebp - 0x2250]
test ecx, ecx
je 0x40d2e7
push ecx
call edi
mov eax, dword [ebp - 0x2254]
xor ecx, ecx
mov dword [ebp - 0x2250], ecx
cmp dword [ebp - 0x2220], 0xc8
jne 0x40d2fc
cmp ebx, 1
jne 0x40d2fc
mov esi, ebx
jmp 0x40d2fe
xor esi, esi
test eax, eax
je 0x40d315
push eax
call edi
mov ecx, dword [ebp - 0x2250]
mov dword [ebp - 0x2254], 0
test ecx, ecx
je 0x40d326
push ecx
call edi
mov dword [ebp - 0x2250], 0
lea ecx, [ebp - 0x2254]
call fcn.00406f50
lea eax, [ebp - 0x224c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov eax, dword [ebp - 0x2214]
or ebx, 0xffffffff
mov dword [ebp - 4], 0xffffffff
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x40d363
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041a772
mov esp, ebp
pop ebp
ret