Function at 0x599f40
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
cmp dword [ebp + 0xc], 0
je 0x599f52
cmp dword [ebp + 8], 0
jne 0x599f59
xor eax, eax
jmp 0x59a35f
cmp dword [0x85761c], 0
je 0x599f93
cmp dword [0x857620], 0
je 0x599f93
cmp dword [0x857624], 0
je 0x599f93
cmp dword [0x857628], 0
je 0x599f93
cmp dword [0x85762c], 0
je 0x599f93
cmp dword [0x857630], 0
jne 0x59a024
push str.gdiplus.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [0x85761c], eax
cmp dword [0x85761c], 0
jne 0x599fb3
xor eax, eax
jmp 0x59a35f
push str.GdipCreateBitmapFromStream
mov eax, dword [0x85761c]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x857620], eax
push str.GdiplusStartup
mov ecx, dword [0x85761c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x857624], eax
push str.GdiplusShutdown
mov edx, dword [0x85761c]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x857628], eax
push str.GdipSaveImageToStream
mov eax, dword [0x85761c]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x85762c], eax
push str.GdipDisposeImage
mov ecx, dword [0x85761c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x857630], eax
cmp dword [0x857620], 0
je 0x59a051
cmp dword [0x857624], 0
je 0x59a051
cmp dword [0x857628], 0
je 0x59a051
cmp dword [0x85762c], 0
je 0x59a051
cmp dword [0x857630], 0
jne 0x59a067
cmp dword [ebp + 0x14], 0
je 0x59a060
mov edx, dword [ebp + 0x14]
mov dword [edx], str.GdipCreateBitmapFromStream_GdiplusStartup_GdiplusShutdown_GdipSaveImageToStream_GdipDisposeImage_r_n
xor eax, eax
jmp 0x59a35f
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x24], 0
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x10], 0
xor edx, edx
mov dword [ebp - 0xc], edx
mov dword [ebp - 8], edx
mov dword [ebp - 4], edx
mov dword [ebp - 0x10], 1
push 0
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x2c]
push ecx
call dword [0x857624]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
je 0x59a0ef
cmp dword [ebp + 0x14], 0
je 0x59a0e8
mov edx, dword [ebp + 0x14]
mov dword [edx], str.gdi
xor eax, eax
jmp 0x59a35f
mov dword [ebp - 0x44], 0
xor eax, eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x54], ecx
mov edx, dword [ebp - 0x54]
sub edx, 1
mov dword [ebp - 0x54], edx
cmp dword [ebp - 0x54], 3
ja case.default.0x59a119
mov eax, dword [ebp - 0x54]
jmp dword [eax*4 + 0x59a363]
lea ecx, [ebp - 0x44]
push ecx
push str.557CF400_1A04_11D3_9A73_0000F81EF32E
call dword [sym.imp.ole32.dll_CLSIDFromString]
mov dword [ebp - 0x34], eax
jmp 0x59a180
lea edx, [ebp - 0x44]
push edx
push str.557CF401_1A04_11D3_9A73_0000F81EF32E
call dword [sym.imp.ole32.dll_CLSIDFromString]
mov dword [ebp - 0x34], eax
jmp 0x59a180
lea eax, [ebp - 0x44]
push eax
push str.557CF402_1A04_11D3_9A73_0000F81EF32E
call dword [sym.imp.ole32.dll_CLSIDFromString]
mov dword [ebp - 0x34], eax
jmp 0x59a180
lea ecx, [ebp - 0x44]
push ecx
push str.557CF405_1A04_11D3_9A73_0000F81EF32E
call dword [sym.imp.ole32.dll_CLSIDFromString]
mov dword [ebp - 0x34], eax
lea edx, [ebp - 0x44]
push edx
push str.557CF406_1A04_11D3_9A73_0000F81EF32E
call dword [sym.imp.ole32.dll_CLSIDFromString]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
je 0x59a19c
cmp dword [ebp + 0x14], 0
je 0x59a195
mov eax, dword [ebp + 0x14]
mov dword [eax], 0x7d4824
xor eax, eax
jmp 0x59a35f
mov ecx, dword [ebp - 0x14]
push ecx
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x59a1c7
cmp dword [ebp + 0x14], 0
je 0x59a1c0
mov edx, dword [ebp + 0x14]
mov dword [edx], 0x7d4814
xor eax, eax
jmp 0x59a35f
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x59a31e
mov ecx, dword [ebp - 0x14]
push ecx
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0x1c]
push eax
call fcn.005e77f0
add esp, 0xc
mov ecx, dword [ebp - 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
lea edx, [ebp - 0x28]
push edx
push 0
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
jl 0x59a21b
cmp dword [ebp - 0x28], 0
jne 0x59a220
jmp 0x59a31e
lea ecx, [ebp - 0x4c]
push ecx
mov edx, dword [ebp - 0x28]
push edx
call dword [0x857620]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
jl 0x59a23d
cmp dword [ebp - 0x4c], 0
jne 0x59a242
jmp 0x59a31e
lea eax, [ebp - 0x48]
push eax
push 0
push 0
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
jl 0x59a25f
cmp dword [ebp - 0x48], 0
jne 0x59a264
jmp 0x59a31e
push 0
lea ecx, [ebp - 0x44]
push ecx
mov edx, dword [ebp - 0x48]
push edx
mov eax, dword [ebp - 0x4c]
push eax
call dword [0x85762c]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
jge 0x59a286
jmp 0x59a31e
lea ecx, [ebp - 0x18]
push ecx
mov edx, dword [ebp - 0x48]
push edx
call dword [sym.imp.ole32.dll_GetHGlobalFromStream]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
jge 0x59a29f
jmp 0x59a31e
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalSize]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x24], 0
je 0x59a302
mov edx, dword [ebp - 0x14]
push edx
call fcn.005f9769
add esp, 4
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x30], eax
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 0x14]
mov dword [ecx], edx
mov eax, dword [ebp - 0x14]
push eax
push 0
mov ecx, dword [ebp - 0x30]
push ecx
call fcn.005e7b30
add esp, 0xc
mov edx, dword [ebp - 0x14]
push edx
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [ebp - 0x30]
push ecx
call fcn.005e77f0
add esp, 0xc
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, dword [ebp - 0x4c]
push eax
call dword [0x857630]
mov dword [ebp - 0x34], eax
jmp 0x59a1d4
mov ecx, dword [ebp - 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
cmp dword [ebp - 0x28], 0
je 0x59a33a
mov edx, dword [ebp - 0x28]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x28]
push ecx
call dword [eax + 8]
cmp dword [ebp - 0x48], 0
je 0x59a34c
mov edx, dword [ebp - 0x48]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x48]
push ecx
call dword [eax + 8]
cmp dword [ebp - 0x2c], 0
je 0x59a35c
mov edx, dword [ebp - 0x2c]
push edx
call dword [0x857628]
mov eax, dword [ebp - 0x30]
mov esp, ebp
pop ebp
ret